The simple Java encryption algorithm is:
BASE64 strictly speaking, it belongs to the encoding format, not the encryption algorithm
MD5 (Message Digest algorithm 5, Information Digest algorithm)
SHA (Secure Hash algorithm, security hashing algorithm)
HMAC (Hash message authentication code, hash messages authentication code)
1. BASE64Base6
The RSA public Key cryptography algorithm was introduced in 1977 by Ronald Leevist (Ron rivest), Adi Samor (Adi Shamir) and Lennard Adman (Leonard Adleman). At the time, all three of them worked at MIT. RSA is the first letter of their three surnames made together.RSA is the most influential public key encryption algorithm, which can resist most of the cryptographic attacks known so far, and has been recommended by ISO as a public key data
longer recommended to use.Md5:message-digest algorithm 5;Sha1:secure Hash algorithm; Key encryption TechnologyTake the key to lock the door for example, the key we can be seen as a key, the door lock process can be regarded as the encryption process, lock the process used in the principle is the encryption algorithm P
Objective
The moving end is getting more and more hot, and we're always going to have to deal with the mobile end of the development process, like Android and iOS. In order to make data interaction more secure, we need to encrypt the data for transmission.
This article to share AES encryption and decryption, Android and iOS general AES
plaintext, but the plaintext length cannot exceed the key length regardless of the length of the plaintext, RSA generated ciphertext length is always fixed.However, the plaintext length cannot exceed the key length. For example, the Java default RSA encryption implementation does not allow the plaintext length to exceed the key length minus 11 (in bytes, that is
object called classloader, which loads the new class into the running JVM. JVM provides classloader with a class to be loaded (for example, Java. lang. object) Name string, then the classloader is responsible for finding the class file, loading the original data, and converting it into a class object. The user downloads encrypted class files and decrypts them when they are loaded. Therefore, they can be se
I wrote a small program for encryption and decryption to share with you.
Public class testencrypt {
/*** Todo ** @ Param ARGs* @ Author yinpengbo, 04:35:12* @ Modified*/// Key generatorPrivate keygenerator keygen;// Stores the keyPrivate secretkey skey;// Encryption and decryption toolsPrivate cipher c;// Stores encryption resultsPrivate byte [] cipherbyte;Publi
Encryption | control | design
1. Copyright NoticeThis article is a description of how to load the encrypted class file with the serial number. The resin Hessian mentioned herein is the registered product name of Caucho Company and its copyright is Caucho all. This article can be reproduced, but must indicate the author's blog address: Http://blog.csdn.net/oldjavaman
2. The applicable object of this articleAs a technician, the technical details of this
In addition to DES, we also know that there are Desede (TripleDES, 3DES), AES, Blowfish, RC2, RC4 (arcfour) and other kinds of symmetric encryption, the implementation of the same way, here is another symmetric encryption algorithm--PBE
Pbe
Pbe--password-based encryption (based on password
(n) )
(n,e) is the public key, (N,D) is the private key.
Encryption process:
We need to encrypt the e-order of the data m and then use the result to the N to find the film, the result is C.
Decryption process:
The data that needs to be decrypted is D, and then the result is used to find the N film, and the result is M.
Limitations of the RSA algorithm:First, the general RSA algorithm film long bit 1024 bits, that is, 12
The RSA public Key cryptography algorithm was introduced in 1977 by Ronald Leevist (Ron rivest), Adi Samor (Adi Shamir) and Lennard Adman (Leonard Adleman). At the time, all three of them worked at MIT. RSA is the first letter of their three surnames made together.RSA is the most influential public key encryption algorithm, which can resist most of the cryptographic attacks known so far, and has been recommended by ISO as a public key data
. md5encoder somedata
As a representative of single-key encryption, des still seems to be in the list of Pentagon export restrictions !?
Ii. asymmetric encryption DSA Digital Signature
The key pair is used. Based on the principle of asymmetric encryption, the Public Key is distributed and encrypted. The private key is kept confidential for decryption. The digital
, and if the data is encrypted with the public key, then only the corresponding private key can be decrypted, and vice versa. Because encryption and decryption use two different keys, the algorithm is called an asymmetric encryption algorithm.Work processFor example, the transmission of data between A and B using asymmetric e
Java and..;
First, let's take a look at Java's support for security.JDK provides a very powerful set of APIs and general implementation of common algorithms and protocols. It mainly includes four aspects:1,Encryption and decryptionThis section provides support for common algorithms and their encryption standards, and is embodied in JCA [
OriginalThere are 3 common types of encryption1, positive encryption, such as MD5, encrypted ciphertext fixed, there is no way to crack, but can be able to have a certain probability of database crash to find, but now generally used in this way encryption will add salt value.2, symmetric encryption, through a fixed symmetric key, the need to transmit data
:
Private Final Static int iterations = 20;
The larger the value above, the deeper the encryption, the general examples are based on the value of the example in the "Java security programming guide" book, set to 1000, we only need 20 here, the reason is the speed of encryption and decryption.
Int saltlength = 12;This
JRE \ Lib \ RT. the corresponding file in the jar package can run the encrypted jar package normally. For example, if you write the loadfromjar method in other custom classes (such as tool classes), add the class to Rt. Jar together. The namespace must also be sun. Misc. Otherwise, the system will not be able to load the class itself. We will discuss the issue of rewriting the system class namespace in the future.
The "cost" of modifying the system
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.