[#EVP_DecryptInit]
= EVP&lowbar;DecryptInit
:mrdocs:

Initialize a cipher context for decryption (legacy ENGINE&hyphen;aware form)&period;

== Synopsis

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

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
int
EVP&lowbar;DecryptInit(
    xref:EVP_CIPHER_CTX.adoc[EVP&lowbar;CIPHER&lowbar;CTX]* ctx,
    xref:EVP_CIPHER-07.adoc[EVP&lowbar;CIPHER] const* cipher,
    unsigned char const* key,
    unsigned char const* iv);
----

== Description

Prefer EVP&lowbar;DecryptInit&lowbar;ex2() for new code&period;

== Return Value

1 on success, or 0 on failure&period;

== Parameters

[cols="1,4"]
|===
| Name| Description
| *ctx*
| Cipher context to initialize&period;
| *cipher*
| Cipher algorithm to use&period;
| *key*
| Decryption key bytes, or NULL to set later&period;
| *iv*
| Initialization vector, or NULL when not yet required&period;
|===


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