![](/img/trans.png)
[英]PHP Warning: openssl_decrypt(): IV passed is 32 bytes long which is longer than the 16 expected by selected cipher
[英]PHP error: Warning: openssl_decrypt(): Unknown cipher algorithm
當我運行這個:
<?php
openssl_decrypt('<string>', 'mcrypt_rijndael_256', '<key>', 0, '');
?>
我收到此錯誤:
Warning: openssl_decrypt(): Unknown cipher algorithm
我不確定我的VM是否已正確配置為處理“ mcrypt_rijndael_256”。 我的phpinfo在mcrypt部分顯示:
mcrypt
mcrypt support enabled
mcrypt_filter support enabled
Version 2.5.8
Api No 20021217
Supported ciphers cast-128 gost rijndael-128 twofish arcfour cast-256 loki97 rijndael-192 saferplus wake blowfish-compat des rijndael-256 serpent xtea blowfish enigma rc2 tripledes
Supported modes cbc cfb ctr ecb ncfb nofb ofb stream
我有PHP 7.2.7。 是否需要以某種方式將其添加到PHP?
您正在嘗試在openssl
函數中使用mcrypt's
算法名稱,這將不起作用,因為mcrypt和openssl是不同的擴展名。 而且RIJNDAEL_256
在openssl中沒有直接對應的對象。 有關更多詳細信息,請參見另一個問題 。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.