Title if not the same how to use PHP to write Javascipt MD5 encryption method
Reply content:
Title if not the same how to use PHP to write Javascipt MD5 encryption method
First of all you know what to do when MD5. You can refer to Google alive this article: http://segmentfault.com/blog/liangyi/1190000002409125
In general: MD5 is a kind of information digest algorithm, which is independent of the specific language. You can do this with Java, PHP, or JavaScript, and the value of MD5 is changed based on whether the information has changed. For the same piece of information, the values calculated in the language above should be the same. Not the same. That means they have different implementations of the algorithm.
JS where the MD5, are the third-party implementation
Then again, since they are all called MD5, the algorithm is definitely the same, but there are differences in the types of data values returned 可能会
MD5 evaluates to 128bit hash values, some Java libraries return a byte array of 16 bytes (8bit=1byte), and most of the standard MD5 implementations return the hex representation of the 16 bytes directly, which is a string of 32 16 binary numbers.