[#CMS_EncryptedData_set1_key] = CMS_EncryptedData_set1_key :mrdocs: Set the content‐encryption cipher and copy the symmetric key into a CMS EncryptedData. == Synopsis Declared in `<openssl/cms.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- int CMS_EncryptedData_set1_key( xref:CMS_ContentInfo.adoc[CMS_ContentInfo]* cms, xref:EVP_CIPHER-07.adoc[EVP_CIPHER] const* ciph, unsigned char const* key, size_t keylen); ---- == Return Value 1 on success, or 0 on failure. == Parameters [cols="1,4"] |=== | Name| Description | *cms* | ContentInfo expected to contain EncryptedData (AEAD ciphers are not supported). | *ciph* | Symmetric cipher whose ASN.1 parameters are recorded. | *key* | Symmetric key bytes to copy. | *keylen* | Length of `key` in octets. |=== [.small]#Created with https://www.mrdocs.com[MrDocs]#