mbedtls_cipher_set_iv() function
This function sets the initialization vector (IV) or nonce.
Arguments
ctx
The generic cipher context. This must be initialized and bound to a cipher information structure.
iv
The IV to use, or NONCE_COUNTER for CTR-mode ciphers. This must be a readable buffer of at least \p iv_len Bytes.
iv_len
The IV length for ciphers with variable-size IV. This parameter is discarded by ciphers with fixed-size IV.
Return value
\c 0 on success. #MBEDTLS_ERR_CIPHER_BAD_INPUT_DATA on parameter-verification failure.
Notes
Some ciphers do not use IVs nor nonce. For these ciphers, this function has no effect.
Functions calling mbedtls_cipher_set_iv()
Functions called by mbedtls_cipher_set_iv()
mbedtls_cipher_set_iv()
memcpy() all items filtered out
Data read by mbedtls_cipher_set_iv()
Data written by mbedtls_cipher_set_iv()
mbedtls_cipher_set_iv()::actual_iv_size all items filtered out
mbedtls_cipher_set_iv()
mbedtls_cipher_set_iv()::actual_iv_size all items filtered out
Type of mbedtls_cipher_set_iv()
mbedtls_cipher_set_iv()
size_t all items filtered out