[#PKCS7_encrypt_ex]
= PKCS7&lowbar;encrypt&lowbar;ex
:mrdocs:

Create a PKCS&num;7 envelopedData encrypting `in` for each recipient in `certs&period;`

== Synopsis

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

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
xref:PKCS7.adoc[PKCS7]*
PKCS7&lowbar;encrypt&lowbar;ex(
    stack&lowbar;st&lowbar;X509* certs,
    xref:BIO.adoc[BIO]* in,
    xref:EVP_CIPHER-07.adoc[EVP&lowbar;CIPHER] const* cipher,
    int flags,
    xref:OSSL_LIB_CTX.adoc[OSSL&lowbar;LIB&lowbar;CTX]* libctx,
    char const* propq);
----

== Return Value

New PKCS7 envelopedData object, or NULL on error&period;

== Parameters

[cols="1,4"]
|===
| Name| Description
| *certs*
| Recipient certificates whose public keys encrypt the content&hyphen;encryption key&period;
| *in*
| BIO supplying the plaintext content&period;
| *cipher*
| Content&hyphen;encryption cipher (for example AES&hyphen;256&hyphen;CBC)&period;
| *flags*
| PKCS7&lowbar;&ast; encryption flags&period;
| *libctx*
| Library context for algorithm fetches, or NULL for the default&period;
| *propq*
| Property query for algorithm fetches, or NULL&period;
|===


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