pfx certificate encryption

Signs function (Data $, $ pfxpath, pfxpwd $) {
      $ certs = Array ();
     openssl_pkcs12_read (file_get_contents ($ pfxpath), certs $, $ pfxpwd); // path wherein pfxpath certificate certificate password for your password
     if ( ! $ certs) {
           return;
    }
    $ = Signature '';
    openssl_sign (Data $, $ Signature, certs $ [ 'PKey']);
   return the base64_encode ($ Signature);
}

Guess you like

Origin www.cnblogs.com/wangguizhong/p/11981432.html