PHP在mcrypt和openssl之间的区别? [英] PHP difference between mcrypt and openssl?
本文介绍了PHP在mcrypt和openssl之间的区别?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
<?php
echo bin2hex(mcrypt_encrypt(blowfish,test,test,ecb))\\\
;
echo bin2hex(openssl_encrypt(test,bf-ecb,test,true))\\\
;
?>
解决方案
由于不同的密码到加密 - 密钥推导方法。
Why have these two methods of using blowfish in ecb-mode different outputs?
<?php
echo bin2hex(mcrypt_encrypt("blowfish", "test", "test", "ecb"))."\n";
echo bin2hex(openssl_encrypt("test", "bf-ecb", "test", true))."\n";
?>
解决方案
Because of different password-to-encryption-key derivation methods.
这篇关于PHP在mcrypt和openssl之间的区别?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文