[#CMS_RecipientInfo_kari_decrypt]
= CMS&lowbar;RecipientInfo&lowbar;kari&lowbar;decrypt
:mrdocs:

Unwrap the content&hyphen;encryption key from one KARI RecipientEncryptedKey into `cms&period;`

== Synopsis

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

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
int
CMS&lowbar;RecipientInfo&lowbar;kari&lowbar;decrypt(
    xref:CMS_ContentInfo.adoc[CMS&lowbar;ContentInfo]* cms,
    xref:CMS_RecipientInfo.adoc[CMS&lowbar;RecipientInfo]* ri,
    xref:CMS_RecipientEncryptedKey.adoc[CMS&lowbar;RecipientEncryptedKey]* rek);
----

== Return Value

1 on success, or 0 on failure&period;

== Parameters

[cols="1,4"]
|===
| Name| Description
| *cms*
| Enveloped ContentInfo that receives the decrypted CEK&period;
| *ri*
| Key&hyphen;agreement RecipientInfo with private key and peer material already set&period;
| *rek*
| RecipientEncryptedKey entry that holds the wrapped CEK for this recipient&period;
|===


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