MD5 is a common encryption algorithm and is often used to verify information integrity, such as file integrity. In terminology, MD5 is a Message Digest Algorithm (Message Digest Algorithm ). There is also a common message digest algorithm SHA1. If
Java comes with Data encryption class MessageDigest (MD5 or SHA encryption)DescriptionIn the website, in order to protect the website member's user name and the password and so on privacy information, therefore we in the user registers the direct MD5
MessageDigest can use the encryption method has md2\md5\sha-1\sha-256\sha-384\sha-512, use time only to replace the corresponding parameter value can beMessageDigest MD5 = messagedigest.getinstance ("MD5");MessageDigest MD5 =
Objective:
For the SHA Safe hashing algorithm, before how to use, just stay in the heard of the stage, today in the picture Caching framework Glide source code found that its cache key is not MD5 encryption algorithm, but SHA-256 encryption
1. Java Security Architecture 1.1 Introduction to Java Security architectureJava provides classes and interfaces for the security framework. The JDK security API is the core API for the Java programming language, located in the Java.security package
Package Test;import Java.security.messagedigest;import java.security.nosuchalgorithmexception;/** * Cryptographic Tool class * @author GXD * */public class Encriptutil {public static void main (string[] args) {String str = "I love you 23";
Objective:For the SHA Secure Hash algorithm, not used before, just stay in the heard of the stage, today in the picture cache frame Glide source found that its cache key is not MD5 encryption algorithm, but SHA-256 encryption algorithm, this just
The Java encryption and decryption technology series SHA
Order
Background
Body
Comparison of SHA-1 and MD5
Code implementation
Conclusion
OrderThe basic one-way encryption algorithm--MD5 is introduced in the
This article is reproduced from: Portal, theft code shameful, we are the code of the porter, only handling, not stolen code
Package cc.restyle.util;
Import Java.security.MessageDigest;
Import java.security.NoSuchAlgorithmException; /** * SHA-512
The messagedigest class provides information digest algorithms for applications, such as MD5 or Sha algorithms. Information digest is a secure one-way hash function that receives data of any size and outputs a hash value of a fixed length.The
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.