[#CMS_EncryptedData_encrypt_ex] = CMS_EncryptedData_encrypt_ex :mrdocs: Create a CMS EncryptedData ContentInfo by encrypting data from a BIO (with libctx). == Synopsis Declared in `<openssl/cms.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- xref:CMS_ContentInfo.adoc[CMS_ContentInfo]* CMS_EncryptedData_encrypt_ex( xref:BIO.adoc[BIO]* in, xref:EVP_CIPHER-07.adoc[EVP_CIPHER] const* cipher, unsigned char const* key, size_t keylen, unsigned int flags, xref:OSSL_LIB_CTX.adoc[OSSL_LIB_CTX]* libctx, char const* propq); ---- == Description Unless CMS_STREAM and/or CMS_PARTIAL is set, CMS_final() is called internally. == Return Value New EncryptedData ContentInfo, or NULL on error. == Parameters [cols="1,4"] |=== | Name| Description | *in* | BIO supplying the plaintext to encrypt. | *cipher* | Symmetric cipher; must support ASN.1 encoding of its parameters (AEAD not supported). | *key* | Encryption key bytes. | *keylen* | Length of `key` in bytes. | *flags* | CMS_* option flags such as CMS_DETACHED, CMS_STREAM, or CMS_PARTIAL. | *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]#