我们无法使协议 3 的表单正常工作,并收到“此协议版本不支持 5068 加密方法”消息。我们拥有的加密代码如下所示。谁能告诉我我们哪里出错了?
$stuff = @pkcs5_pad($stuff, 16);
$crypt = @base64_encode(@mcrypt_encrypt(MCRYPT_RIJNDAEL_128, $order['gateway']['transkey'], $stuff, MCRYPT_MODE_CBC, '1234567812345678'));
function pkcs5_pad ($text, $blocksize) {
$pad = $blocksize - (strlen($text) % $blocksize);
return $text . str_repeat(chr($pad), $pad);
}