Uncaught Error: Call to undefined function mcrypt_get_iv_size() 瑙e喅鍔炴硶

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了Uncaught Error: Call to undefined function mcrypt_get_iv_size() 瑙e喅鍔炴硶相关的知识,希望对你有一定的参考价值。

鏍囩锛?a href='http://www.mamicode.com/so/1/default' title='default'>default   uncaught   creat   鐗堟湰   rand   hex   func   瑙e喅鍔炴硶   plain   

鍑芥暟 mcrypt_get_iv_size 鍦ㄥ彧鍦?PHP 4 >= 4.0.2, PHP 5, PHP 7 < 7.2.0, PECL mcrypt >= 1.0.0) 杩欏嚑涓増鏈腑鏈夋晥銆?/p>

鏃х増鏈殑PHP涓ぇ閮ㄥ垎閮芥槸鐢ㄨ繖涓潵鐢熸垚鍔犲瘑銆傛柊鐨凱HP7.3鐨勭増鏈腑鍙互鐢╫penssl_encrypt 鏉ョ敓鎴愬姞瀵嗘枃鏈€?/p>

$cipher = openssl_encrypt($plain, 鈥楢ES-128-ECB鈥? $key, OPENSSL_RAW_DATA);
$cipher = bin2hex($cipher);

 

鏃х殑浠g爜濡備笅锛?/p>

// aes128鍔犲瘑
$iv_size = mcrypt_get_iv_size(MCRYPT_RIJNDAEL_128, MCRYPT_MODE_ECB);
$iv = mcrypt_create_iv($iv_size, MCRYPT_RAND);
$cipher = mcrypt_encrypt(MCRYPT_RIJNDAEL_128, $key, $plain, MCRYPT_MODE_ECB, $iv); //ECB妯″紡锛孖V涓嶈捣浣滅敤

 

鍒ゆ柇PHP鐗堟湰鐨勪竴涓柟娉?/p>

php_VERSION_ID > 70000

鍘熸枃閾炬帴锛歨ttps://blog.csdn.net/default7/article/details/90905510

以上是关于Uncaught Error: Call to undefined function mcrypt_get_iv_size() 瑙e喅鍔炴硶的主要内容,如果未能解决你的问题,请参考以下文章

Uncaught Error: Call to undefined function mcrypt_get_iv_size() 瑙e喅鍔炴硶

有关使用phpstudy搭建sqli-lab环境搭建时发生Uncaught Error: Call to undefined function mysql_connect()错误

uploadify 报错 uncaught call to getstats failed

Uncaught (in promise) DOMException: The play() request was interrupted by a call to pause().

React-Slick Slider Giving Error “Uncaught TypeError: Cannot call a class as a function”

关于 Uncaught (in promise) DOMException: The play() request was interrupted by a call to pause() 错误(示例