[#PKCS7_decrypt] = PKCS7_decrypt :mrdocs: Decrypt a PKCS#7 envelopedData (or signed‐and‐enveloped) structure for a recipient. == Synopsis Declared in `<openssl/pkcs7.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- int PKCS7_decrypt( xref:PKCS7.adoc[PKCS7]* p7, xref:EVP_PKEY.adoc[EVP_PKEY]* pkey, xref:X509.adoc[X509]* cert, xref:BIO.adoc[BIO]* data, int flags); ---- == Return Value 1 on success, or 0 on failure. == Parameters [cols="1,4"] |=== | Name| Description | *p7* | Enveloped PKCS#7 object to decrypt. | *pkey* | Recipient private key matching a RecipientInfo in `p7.` | *cert* | Recipient certificate used to select the matching RecipientInfo, or NULL. | *data* | BIO that receives the decrypted content. | *flags* | PKCS7_* decryption flags (for example PKCS7_TEXT). |=== [.small]#Created with https://www.mrdocs.com[MrDocs]#