[#EVP_PKEY_encapsulate_init]
= EVP&lowbar;PKEY&lowbar;encapsulate&lowbar;init
:mrdocs:

Initialize a key context for a key&hyphen;encapsulation (KEM) encapsulate operation&period;

== Synopsis

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

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
int
EVP&lowbar;PKEY&lowbar;encapsulate&lowbar;init(
    xref:EVP_PKEY_CTX.adoc[EVP&lowbar;PKEY&lowbar;CTX]* ctx,
    xref:OSSL_PARAM.adoc[OSSL&lowbar;PARAM] const params[]);
----

== Return Value

1 on success, or a non&hyphen;positive value on failure&period;

== Parameters

[cols="1,4"]
|===
| Name| Description
| *ctx*
| Context holding the recipient public key&period;
| *params*
| Optional OSSL&lowbar;PARAM array terminated by OSSL&lowbar;PARAM&lowbar;END, or NULL&period;
|===


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