EVP_EncryptInit_ex

Initialize ctx for encryption with an optional ENGINE implementation.

Synopsis

Declared in <openssl/evp.h>

int
EVP_EncryptInit_ex(
    EVP_CIPHER_CTX* ctx,
    EVP_CIPHER const* cipher,
    ENGINE* impl,
    unsigned char const* key,
    unsigned char const* iv);

Return Value

1 on success, or 0 on failure.

Parameters

NameDescription
ctxCipher context to initialize.
cipherCipher algorithm, or NULL to reuse the current algorithm.
implOptional ENGINE providing the implementation, or NULL.
keyEncryption key bytes, or NULL to set later.
ivInitialization vector, or NULL when not required / set later.