In the development process, a lot of time to consider the problem of data security, especially when it comes to money, we will be very sensitive. So there are a lot of different methods of data encryption on the network.
Common encryption methods include MD5 encryption, RSA encryption, ASR encryption, base64 encryption, and so on.
MD5 encryption
MD5 is message-digest algorithm 5 (Information-Digest algorithm 5), which is used to ensure complete and consistent information transmission. is one of the widely used hashing algorithms (also translation digest algorithm, hashing algorithm), mainstream programming language has been widely MD5 implemented. The calculation of data (such as Chinese characters) as another fixed length value is the basic principle of the hashing algorithm, and the predecessor of MD5 is MD2, MD3 and MD4.
MD5 's role is to allow bulk information to be "compressed" into a confidential format before signing a private key with a digital signature software (that is, converting an arbitrary-length byte string into a long hexadecimal string).
MD5 We are developing an app, for the request, there is a "sign" field, the key corresponding to the value of MD5 encrypted field. MD5 is irreversible, at least for now . It is used for bilateral verification, that is, to verify that two files or two pieces of content is consistent, because two of the same files or content their MD5 value is the same. Therefore, some file download tools, after the download will be verified, the way to verify is MD5.
It becomes a string of 16 strings in length and is then compared to the background. If the same is true, the match is correct, if not the same is wrong.
For an analysis of RSA encryption and decryption, please refer to URL http://witcheryne.iteye.com/blog/2171850 and http://blog.iamzsx.me/show.html?id=155002
A brief analysis of common encryption algorithms