[#CMS_decrypt_set1_key]
= CMS&lowbar;decrypt&lowbar;set1&lowbar;key
:mrdocs:

Install a KEKRecipientInfo key on a CMS ContentInfo so CMS&lowbar;decrypt can use it&period;

== Synopsis

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

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
int
CMS&lowbar;decrypt&lowbar;set1&lowbar;key(
    xref:CMS_ContentInfo.adoc[CMS&lowbar;ContentInfo]* cms,
    unsigned char* key,
    size&lowbar;t keylen,
    unsigned char const* id,
    size&lowbar;t idlen);
----

== Return Value

1 on success, or 0 on failure&period;

== Parameters

[cols="1,4"]
|===
| Name| Description
| *cms*
| Enveloped ContentInfo that contains a KEK recipient&period;
| *key*
| Symmetric key&hyphen;encryption key octets&period;
| *keylen*
| Length of `key` in bytes&period;
| *id*
| Optional key identifier matching the recipient&apos;s keyEncryptionKeyIdentifier, or NULL&period;
| *idlen*
| Length of `id` in bytes when `id` is non&hyphen;NULL&period;
|===


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