mbedtls_ctr_drbg_update() function
This function updates the state of the CTR_DRBG context.
Arguments
additional
The data to update the state with. This must not be \c NULL unless \p add_len is \c 0.
add_len
Length of \p additional in bytes. This must be at most #MBEDTLS_CTR_DRBG_MAX_SEED_INPUT.
Return value
\c 0 on success. #MBEDTLS_ERR_CTR_DRBG_INPUT_TOO_BIG if \p add_len is more than #MBEDTLS_CTR_DRBG_MAX_SEED_INPUT. An error from the underlying AES cipher on failure.
Notes
This function is not thread-safe. It is not safe to call this function if another thread might be concurrently obtaining random numbers from the same context or updating or reseeding the same context.
![]()
ret = mbedtls_ctr_drbg_update(ctx, buf, n);
mbedtls_ctr_drbg_update() is called by 1 function and calls 3 functions:
![]()
mbedtls_ctr_drbg_update()
mbedtls_ctr_drbg_update():
![]()
mbedtls_ctr_drbg_update()