[#PKCS7_dataDecode]
= PKCS7&lowbar;dataDecode
:mrdocs:

Create a BIO that decrypts&sol;verifies PKCS&num;7 content for reading&period;

== Synopsis

Declared in `&lt;openssl&sol;pkcs7&period;h&gt;`

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
xref:BIO.adoc[BIO]*
PKCS7&lowbar;dataDecode(
    xref:PKCS7.adoc[PKCS7]* p7,
    xref:EVP_PKEY.adoc[EVP&lowbar;PKEY]* pkey,
    xref:BIO.adoc[BIO]* in&lowbar;bio,
    xref:X509.adoc[X509]* pcert);
----

== Return Value

BIO that yields cleartext content, or NULL on error&period;

== Parameters

[cols="1,4"]
|===
| Name| Description
| *p7*
| PKCS&num;7 EnvelopedData &sol; SignedAndEnvelopedData (or similar) to decode&period;
| *pkey*
| Recipient private key for decryption, or NULL when not required&period;
| *in&lowbar;bio*
| Optional BIO supplying encrypted content when not embedded in `p7,` or NULL&period;
| *pcert*
| Recipient certificate used to select the matching RecipientInfo, or NULL&period;
|===


[.small]#Created with https://www.mrdocs.com[MrDocs]#
