Initialize a cipher context for decryption (legacy ENGINE‐aware form).

Synopsis

Declared in <openssl/evp.h>

int
EVP_DecryptInit(
    EVP_CIPHER_CTX* ctx,
    EVP_CIPHER const* cipher,
    unsigned char const* key,
    unsigned char const* iv);

Description

Prefer EVP_DecryptInit_ex2() for new code.

Return Value

1 on success, or 0 on failure.

Parameters

Name

Description

ctx

Cipher context to initialize.

cipher

Cipher algorithm to use.

key

Decryption key bytes, or NULL to set later.

iv

Initialization vector, or NULL when not yet required.

Created with MrDocs