EVP_EncryptFinal_ex

Finalize encryption and write any remaining ciphertext (including padding).

Synopsis

Declared in <openssl/evp.h>

int
EVP_EncryptFinal_ex(
    EVP_CIPHER_CTX* ctx,
    unsigned char* out,
    int* outl);

Return Value

1 on success, or 0 on failure.

Parameters

NameDescription
ctxCipher context previously used with EVP_EncryptUpdate().
outBuffer receiving final ciphertext bytes.
outlReceives the number of bytes written to out.