EVP_Cipher

Encrypt or decrypt up to inl bytes from in into out (legacy one-shot).

Synopsis

Declared in <openssl/evp.h>

int
EVP_Cipher(
    EVP_CIPHER_CTX* c,
    unsigned char* out,
    unsigned char const* in,
    unsigned int inl);

Description

Prefer EVP_CipherUpdate() and EVP_CipherFinal_ex() for new code.

Return Value

1 on success, or 0 on failure.

Parameters

NameDescription
cCipher context already initialized for encrypt or decrypt.
outOutput buffer for the transformed bytes.
inInput bytes to process.
inlNumber of input bytes; for legacy ciphers without EVP_CIPH_FLAG_CUSTOM_CIPHER must be a multiple of the block size.