EVP_CIPHER_CTX_get_updated_iv

Copy the current IV state from a cipher context into a buffer.

Synopsis

Declared in <openssl/evp.h>

int
EVP_CIPHER_CTX_get_updated_iv(
    EVP_CIPHER_CTX* ctx,
    void* buf,
    size_t len);

Return Value

1 on success, or 0 on failure (including if buf is too small).

Parameters

NameDescription
ctxCipher context whose updated IV is read.
bufDestination buffer that receives the IV bytes.
lenSize of buf in bytes; must be at least EVP_CIPHER_CTX_get_iv_length(ctx).