小程序授权 返回此提示 ·The given payload is invalid.
代码
public function decryptData(string $sessionKey, string $iv, string $encrypted): array
{
$decrypted = AES::decrypt(
base64_decode($encrypted, false), base64_decode($sessionKey, false), base64_decode($iv, false)
);
$decrypted = json_decode($this->pkcs7Unpad($decrypted), true);
if (!$decrypted) {
throw new DecryptException('The given payload is invalid.');
}
return $decrypted;
}
关于 LearnKu
至少把你的解密方法代码贴出来,并提供个密文、密钥等等参数demo,才好帮你分析问题。