mbedtls_ctr_drbg_random() function
This function uses CTR_DRBG 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.
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.
Examples
mbedtls_ctr_drbg_random() is referenced by 6 libraries and example projects: