EVP_DecryptInit_ex2

Initialize ctx for decryption with cipher, key, iv, and optional parameters.

Synopsis

Declared in <openssl/evp.h>

int
EVP_DecryptInit_ex2(
    EVP_CIPHER_CTX* ctx,
    EVP_CIPHER const* cipher,
    unsigned char const* key,
    unsigned char const* iv,
    OSSL_PARAM const params[]);

Return Value

1 on success, or 0 on failure.

Parameters

NameDescription
ctxCipher context to (re)initialize.
cipherCipher algorithm, or NULL to reuse the algorithm already associated with ctx.
keyDecryption key bytes, or NULL to set the cipher without a key yet.
ivInitialization vector, or NULL when unused or set later.
paramsOptional OSSL_PARAM array applied after initialization, or NULL.