Home  >  Article  >  php教程  >  nodejs md5 与 php md5 中英文加密结果不一样,怎么办?

nodejs md5 与 php md5 中英文加密结果不一样,怎么办?

WBOY
WBOYOriginal
2016-06-06 19:42:121275browse

nodejs md5 md5.update('DOMAIN_CHECKagent19272中国双方的首送达方式发斯蒂芬.cnb18d0a001af1638ec24f26b0a565be23, utf8); 结果:82d5e459b1846c545bdcadcf11cc4057 php md5 md5(DOMAIN_CHECKagent19272中国双方的首送达方式发斯蒂芬.cnb18d0a001af1638ec2

nodejs md5 md5.update('DOMAIN_CHECKagent19272中国双方的首送达方式发斯蒂芬.cnb18d0a001af1638ec24f26b0a565be23’, ‘utf8’);

结果:82d5e459b1846c545bdcadcf11cc4057

php md5 md5(“DOMAIN_CHECKagent19272中国双方的首送达方式发斯蒂芬.cnb18d0a001af1638ec24f26b0a565be23”);

结果:d5d5016d1097f3ebf6ab3049b9341dc2

php 5.6.0

单独加密结果是正确的,但混合中英文,两者结果就不一样了。

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn