function signs($data,$pfxpath,$pfxpwd) {
$certs = array();
openssl_pkcs12_read(file_get_contents($pfxpath), $certs, $pfxpwd); // 其中pfxpath为证书路径 password为你的证书密码
if (!$certs) {
return;
}
$signature = '';
openssl_sign($data, $signature, $certs['pkey']);
return base64_encode($signature);
}
pfx证书加密
猜你喜欢
转载自www.cnblogs.com/wangguizhong/p/11981432.html
今日推荐
周排行