[#EVP_OpenInit]
= EVP&lowbar;OpenInit
:mrdocs:

Initialize envelope decryption&colon; unwrap `ek` with `priv` and set up `type&period;`

== Synopsis

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

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
int
EVP&lowbar;OpenInit(
    xref:EVP_CIPHER_CTX.adoc[EVP&lowbar;CIPHER&lowbar;CTX]* ctx,
    xref:EVP_CIPHER-07.adoc[EVP&lowbar;CIPHER] const* type,
    unsigned char const* ek,
    int ekl,
    unsigned char const* iv,
    xref:EVP_PKEY.adoc[EVP&lowbar;PKEY]* priv);
----

== Return Value

1 on success, or 0 on error&period;

== Parameters

[cols="1,4"]
|===
| Name| Description
| *ctx*
| Cipher context to initialize for decryption&period;
| *type*
| Content&hyphen;encryption cipher, or NULL to defer until a later call&period;
| *ek*
| Encrypted content&hyphen;encryption key&period;
| *ekl*
| Length of `ek` in bytes&period;
| *iv*
| IV for `type,` or NULL if not required yet&period;
| *priv*
| Recipient private key used to decrypt `ek&period;`
|===


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