pfx证书加密
作者:互联网
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);
}
标签:pfxpath,加密,pfxpwd,证书,return,certs,signature,pfx 来源: https://www.cnblogs.com/wangguizhong/p/11981432.html