我想要使用python语言的此功能。 padmode中的三重des = PKCS7。我有php代码:
<?php
//Create sign data(Tripledes(ECB,PKCS7))
function encrypt_pkcs7($str, $key)
{
$key = base64_decode($key);
$ciphertext = OpenSSL_encrypt($str,"DES-EDE3", $key,
OPENSSL_RAW_DATA);
return base64_encode($ciphertext);
}