按照官方提供的解密源码;
数据库记录死在:
$ciphertext_dec = base64_decode($encrypted); $module = mcrypt_module_open(MCRYPT_RIJNDAEL_128, ‘‘, MCRYPT_MODE_CBC, ‘‘); $iv = substr($this->key, 0, 16); mcrypt_generic_init($module, $this->key, $iv); //解密 $decrypted = mdecrypt_generic($module, $ciphertext_dec); mcrypt_generic_deinit($module); mcrypt_module_close($module);
linux php.ini 加
extension=mcrypt.so
windows php.ini
extension=mcrypt.dll
时间: 2024-10-12 08:34:53