$infilename="encrypted.msg";// this file holds your encrypted message $outfilename="decrypted.msg";// make sure you can write to this file if (openssl_pkcs7_decrypt($infilename,$outfilename,$cert,$key)) { echo"decrypted!"; } else { echo"failed to decrypt!"; } ?>...
openssl_private_decrypt -- Decrypts data with private key Description boolopenssl_private_decrypt( string data, string &decrypted, mixed key [, int padding] ) openssl_private_decrypt()decryptsdatathat was previous encrypted viaopenssl_public_encrypt()and stores the result intodecrypted.keymust be ...