Set the content-encryption cipher and copy the symmetric key into a CMS EncryptedData.
Declared in <openssl/cms.h>
int
CMS_EncryptedData_set1_key(
CMS_ContentInfo* cms,
EVP_CIPHER const* ciph,
unsigned char const* key,
size_t keylen);
1 on success, or 0 on failure.
| 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. |