In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-03-28 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/01 Report--
This article mainly introduces "what are the similarities and differences between CRC and MD5". In daily operation, I believe many people have doubts about the similarities and differences between CRC and MD5. The editor consulted all kinds of materials and sorted out simple and easy-to-use methods of operation. I hope it will be helpful to answer the doubts about "what are the similarities and differences between CRC and MD5?" Next, please follow the editor to study!
The use of CRC32 in php:
Crc32-evaluates the crc32 polynomial of a string
Generate 32-bit cyclic redundancy check code polynomials for string parameters. :
This sentence is translated from English and is incorrect. To be exact, it should be understood like this:
A 32-bit cyclic redundancy check polynomial algorithm is used to calculate a string and return a (possibly signed) integer.
How to use it:
The function of this function is similar to md5 algorithm and sha1 algorithm encryption. In the process of using this function, you need to consider taking the absolute value of the returned integer.
As for how to check the integrity of the transmitted data:
Refer to the common usage scenarios of md5.
32-bit cyclic redundancy check polynomial: this is a mathematical algorithm that can be seen in the source code of php. You can think of it as a digital version of the md5 algorithm.
It is often asked that CRC, MD5 and SHA1 all calculate a check value. What is the difference?
Similarities:
CRC, MD5, and SHA1 all generate a check value by calculating the data, which is used to verify the integrity of the data.
Differences:
1. The algorithm is different. CRC uses polynomial division, while MD5 and SHA1 use substitution, rotation and other methods.
two。 The length of the check value is different. The length of the CRC check bit is related to its polynomial, which is usually 16 or 32 bits; MD5 is 16 bytes (128bits); SHA1 is 20 bytes (160bits)
3. The name of the check value is different. CRC is generally called CRC value; MD5 and SHA1 are generally called Hash or hash value
4. Security is different. Security here refers to the ability to detect errors, that is, errors in data can be detected by parity bits. The security of CRC has a lot to do with polynomials, which is much weaker than MD5 and SHA1; the security of MD5 is very high, but it was cracked by Wang Xiaoyun of Shandong University in 2004; SHA1 has the highest security.
5. With different efficiency, the computational efficiency of CRC is very high; MD5 and SHA1 are relatively slow.
6. It's used for different purposes. CRC is generally used to verify communication data; MD5 and SHA1 are used in security (Security) areas, such as file verification, digital signatures, and so on.
At this point, the study of "what are the similarities and differences between CRC and MD5" is over. I hope to be able to solve your doubts. The collocation of theory and practice can better help you learn, go and try it! If you want to continue to learn more related knowledge, please continue to follow the website, the editor will continue to work hard to bring you more practical articles!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.