[#CMS_RecipientInfo_encrypt]
= CMS&lowbar;RecipientInfo&lowbar;encrypt
:mrdocs:

Encrypt the content&hyphen;encryption key into one CMS RecipientInfo&period;

== Synopsis

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

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

== Return Value

1 on success, or 0 on failure&period;

== Parameters

[cols="1,4"]
|===
| Name| Description
| *cms*
| Enveloped ContentInfo that owns `ri&semi;` the CEK must already be available (for example after decrypt)&period;
| *ri*
| RecipientInfo that receives the wrapped content&hyphen;encryption key&period;
|===


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