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

Name

Description

ctx

Cipher context whose updated IV is read.

buf

Destination buffer that receives the IV bytes.

len

Size of buf in bytes; must be at least EVP_CIPHER_CTX_get_iv_length(ctx).

Created with MrDocs