mcrypt在PHP7.1/PHP7.2被抛弃用下面的openssl代替
/* mcrypt在PHP7.1/PHP7.2已经被抛弃了,所以使用下面的openssl来代替
$module = mcrypt_module_open(MCRYPT_RIJNDAEL_128, '', MCRYPT_MODE_CBC, '');
mcrypt_generic_init($module, $key, $iv);
$decrypted = mdecrypt_generic($module, $ciphertext_dec);
mcrypt_generic_deinit($module);
mcrypt_module_close($module);
*/
// $decrypted = openssl_decrypt($encrypted_text, 'AES-256-CBC', $key, OPENSSL_RAW_DATA|OPENSSL_ZERO_PADDING, $iv);
2条回复
我要回复
暂时不支持网页回复,请安装