php 7.1 openssl_decrypt代替 mcrypt_module_open方法
解决方案
经过调试发现php版本由原来的7.0升到了7.1。
mcrypt_module_open()函数在7.1中被贬低,将在7.2中被移除,
要用openssl_decrypt()函数代替
明文加密
原代码
$random = $this->getRandomStr();
$text = $random . pack("N", strlen($text)) . $text . $appid;
$size = mcrypt_get_block_size(MCRYPT_RIJNDAEL_128, MCRYPT_MODE_CBC);
$module = mcrypt_module_open(MCRYPT_RIJNDAEL_128, '', MCRYPT_MODE_CBC, '');
$iv = substr($this->key, 0, 16);
$pkc_encoder = new