手机号解密

在小程序调用官网示例解密手机号一直失败是什么原因,有人遇到过么?代码如下:

$aesKey=base64_decode($this->sessionKey);
if (strlen($iv) != 24) {
Yii::error('error_code:'.ErrorCode::$IllegalIv.'; iv 长度不对 解密失败');
return ErrorCode::$IllegalIv;
}
$aesIV=base64_decode($iv);
$aesCipher=base64_decode($encryptedData);
$result=openssl_decrypt( $aesCipher, "AES-128-CBC", $aesKey, 1, $aesIV);
$dataObj=json_decode( $result );
吃饭、悟禅、打豆豆、在路上
讨论数量: 1
qbhy

既然是php,直接用 easywechat 就好了

2年前 评论

讨论应以学习和精进为目的。请勿发布不友善或者负能量的内容,与人为善,比聪明更重要!