继续收拾残局,php和asp.net的md5差别

asp.net的md5加密貌似是16位的
而php的md5加密是32位的
这样解决

echo substr(md5("admin"),8,16); // 16位MD5加密效果等同于asp.net的md5
echo "<hr>";
echo md5("admin"); // 32位MD5加密

另:php的md5函数,按官方的说法,第二个参数设为true,可以生成16位的,但是淡水测试下来是乱码。淡水没空深究了,有心人可以找找缘由。

Leave a comment

0 Comments.

Leave a Reply


[ Ctrl + Enter ]

*
To prove you're a person (not a spam script), type the security word shown in the picture. Click on the picture to hear an audio file of the word.
Click to hear an audio file of the anti-spam word