Kinds:
- Base64 Encryption , base64 encryption is not in the category of encryption, but for transcoding, such as the transcoding of the URL.
- Message digest algorithm , which contains Md5,sha,mac encryption, are irreversible, but some online said can be decrypted.
- symmetric encryption algorithm ; What is symmetric encryption, is the encryption and decryption of the key is the same, including Des,des3,aes,pbe, which des most infrequently used, easy to be cracked; DES3 is a strong version of Des AES is the fastest and most widely used, and PBE actually uses salt and secret key to implement, is the most complex symmetric encryption algorithm.
- Asymmetric encryption algorithm ; encryption and decryption keys are not the same, the public and private keys are a pair, usually there are two encryption methods, one is private key encryption, public key decryption, the other is public key encryption, private key decryption. contains DH,RSA,ELGAMAL,ECC, personal feeling DH's implementation way code is too complex, not recommended, where RSA code implementation is relatively straightforward.
- digital signature ; message digest algorithm + Asymmetric encryption algorithm. Contains RSA
There are three main implementations of code
- Jdk
- Bouncy
- Common
The following article shows some of the example code I wrote myself.
Java Encryption types