mbedtls_ctr_drbg_random_with_add() function
This function updates a CTR_DRBG instance with additional data and uses it to generate random data.
Arguments
p_rng
The CTR_DRBG context. This must be a pointer to a #mbedtls_ctr_drbg_context structure.
output
The buffer to fill.
output_len
The length of the buffer.
additional
Additional data to update. Can be NULL.
add_len
The length of the additional data.
Return value
\c 0 on success. #MBEDTLS_ERR_CTR_DRBG_ENTROPY_SOURCE_FAILED or #MBEDTLS_ERR_CTR_DRBG_REQUEST_TOO_BIG on failure.
Notes
The function automatically reseeds if the reseed counter is exceeded.
mbedtls_ctr_drbg_random_with_add() is called by 1 function and calls 5 functions:
![]()
mbedtls_ctr_drbg_random_with_add()
mbedtls_ctr_drbg_random_with_add() reads 4 variables and writes 1 variable:
![]()
mbedtls_ctr_drbg_random_with_add()