[#CMS_encrypt_ex] = CMS_encrypt_ex :mrdocs: Create a CMS EnvelopedData or AuthEnvelopedData encrypting content for recipient certificates. == Synopsis Declared in `<openssl/cms.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- xref:CMS_ContentInfo.adoc[CMS_ContentInfo]* CMS_encrypt_ex( xref:stack_st_X509.adoc[stack_st_X509]* certs, xref:BIO.adoc[BIO]* in, xref:EVP_CIPHER-07.adoc[EVP_CIPHER] const* cipher, unsigned int flags, xref:OSSL_LIB_CTX.adoc[OSSL_LIB_CTX]* libctx, char const* propq); ---- == Return Value New enveloped ContentInfo, or NULL on error. == Parameters [cols="1,4"] |=== | Name| Description | *certs* | Stack of recipient certificates (RSA, Diffie‐Hellman, or EC keys). | *in* | BIO supplying the content to encrypt (unused when CMS_STREAM is set). | *cipher* | Symmetric content‐encryption cipher; GCM yields AuthEnvelopedData. | *flags* | Optional CMS flags (CMS_TEXT, CMS_BINARY, CMS_USE_KEYID, CMS_STREAM, CMS_PARTIAL, CMS_DETACHED, …). | *libctx* | Library context for algorithm fetches, or NULL for the default. | *propq* | Property query for provider selection, or NULL. |=== [.small]#Created with https://www.mrdocs.com[MrDocs]#