Description
bool
openssl_pkcs7_decrypt ( string infilename, string outfilename, mixed recipcert [, mixed recipkey] )
Decrypts the S/MIME encrypted message contained in the file specified by
infilename using the certificate and its
associated private key specified by recipcert and
recipkey.
The decrypted message is output to the
file specified by outfilename
Пример 1. openssl_pkcs7_decrypt() example
<?php
$infilename = "encrypted.msg"; $outfilename = "decrypted.msg"; if (openssl_pkcs7_decrypt($infilename, $outfilename, $cert, $key)) {
echo "decrypted!";
} else {
echo "failed to decrypt!";
}
?>
|
|