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
Analysis of four basic encryption algorithms in Java
Simple java encryption algorithms include:
1. BASE64
Base64 is one of the most common encoding methods used to transmit 8-bit code on the network. For details, refer to RFC2045 ~ RFC2049, which has the MIME detailed specification. Base64 encoding can be used to tr
Use encryption technology to protect Java source code
Content:
1. Why encryption?
Ii. Custom Class Loader
Iii. encryption and decryption
4. Application Instances
5. Notes
Reference resources
The source code of the Java program is easily peeked at by others. Anyone can ana
Encryption is often used in daily work. Today I wrote a simple example of using MD5 encryption, and now I paste the source code.
Md5utils class
Package COM. dengsilinming. test; import Java. io. unsupportedencodingexception; import Java. security. messagedigest; import
This example uses AES (Advanced Encryption Standard) to encrypt a file. To use the modifier to generate the key first,
Run the following command: Java aestest-genkey Secret.key so the key is saved to the Secret.key file.
You can now encrypt the file with the following command: Java
algorithm
Asymmetric encryption algorithm
Digital Signature Algorithm (not covered)
Common algorithms
BASE64
MD5
SHA
Hmac
Des
3DES
Aes
Pbe
Rsa
Dh
PrincipleWriting so many encryption and decryption algorithms, in fact, they are essentially the same principle. Just beginning to write the first few time
The simple Java encryption algorithm is:BASE64 strictly speaking, it belongs to the encoding format, not the encryption algorithmMD5 (Message Digest algorithm 5, Information Digest algorithm)SHA (Secure Hash algorithm, security hashing algorithm)HMAC (Hash message authentication code, hash messages authentication code)Analysis of 4 basic
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
Various encryption implementationsHttp://www.blogjava.net/stone2083/archive/2012/09/02/168113.html
Java> classloader> File Checker> Security ManagerBrief description:Purpose of the validator: Check whether the class file is completeSecurity Manager: controls whether an operation is permitted.User AuthenticationDigital SignatureEncryptionThe digital signature is used to verify whether the information has b
If you want to AES256 encryption and decryption, you need to download Local_policy.jar and Us_export_policy.jar to replace the%java_home%/jre/lib/security two policy files in advance from the JAVA official website , Local_policy.jar and Us_export_policy. jar. The main purpose is to break the AES algorithm to only support the 128-bit limit. If not replaced, you ma
Encryption and decryption in Java is mainly to protect the security of the data, divided into symmetric and asymmetric, symmetric means that the encryption key and decryption key is the same key, it is often referred to as the secret key or the private key, asymmetric key represents the encryption key and decryption to
Java Aes256 Encryption Algorithm Implementation, javaaes256
If you want to encrypt and decrypt the AES256 bits, download local_policy.jar and US_export_policy.jar from the java official website to replace the two policy files: % JAVA_HOME %/jre/lib/security, local_policy.jar and US_export_policy. The main purpose is to break through the
(ENCODING); //constructs a key based on a given byte array, and the second parameter specifies the name of a key algorithm//generate HmacSHA1 Private keySecretkey Secretkey =Newsecretkeyspec (data, mac_name); //generates a Mac object that specifies the MAC algorithmMac Mac =mac.getinstance (mac_name); //Initializes a Mac object with a given keyMac.init (Secretkey); byte[] Text =paramstr.getbytes (ENCODING); //Complete MAC Operation byte[] Encryptbyte =mac.dofinal (text); //will byte[]-->
Recently, the company's project needs to upload/download data to AES+RSA encryption and decryption requirements, the client has the VC RSA encryption interface, and said to be compatible with their system, that is, VC to use their module to implement encryption and decryption. During the process there are several pits,
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
This paper mainly introduces the Java implementation of the common encryption algorithm-one-way encryption algorithm MD5 and Sha, as follows:
1, the Java security architecture
Introduction to 1.1 Java security architecture
provides classes and interfaces for the security
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.