wx.getUserInfo 获取的加密数据解密 乱码
wx.getUserInfo 获取的加密数据解密 乱码 解密代码用的官方 稍微修改了下 if (strlen($this->sessionKey) != 24) { //return ErrorCode::$IllegalAesKey; return ""; } $aesKey = base64_decode($this->sessionKey); if (strlen($iv) != 24) { //return ErrorCode::$IllegalIv; return ""; } $aesIV=base64_decode($iv); $aesCipher=base64_decode($encryptedData); $result = openssl_decrypt( $aesCipher, "AES-128-CBC", $aesKey, 1, $aesIV); return $result; 解密结果就是 [图片]