2010-08-27 55 views
2

爲什麼這兩種方法在ecb模式下使用河豚不同的輸出?mcrypt和openssl的PHP區別?

<?php 

echo bin2hex(mcrypt_encrypt("blowfish", "test", "test", "ecb"))."\n"; 
echo bin2hex(openssl_encrypt("test", "bf-ecb", "test", true))."\n"; 

?> 

回答

1

由於不同的密碼到加密密鑰推導方法。