mbedtls_ctr_drbg_set_nonce_len() function
This function sets the amount of entropy grabbed as a nonce for the initial seeding. Call this function before calling mbedtls_ctr_drbg_seed() to read a nonce from the entropy source during the initial seeding.
Arguments
len
The amount of entropy to grab for the nonce, in bytes. This must be at most #MBEDTLS_CTR_DRBG_MAX_SEED_INPUT and at most the maximum length accepted by the entropy function that is set in the context.
Return value
\c 0 on success. #MBEDTLS_ERR_CTR_DRBG_INPUT_TOO_BIG if \p len is more than #MBEDTLS_CTR_DRBG_MAX_SEED_INPUT. #MBEDTLS_ERR_CTR_DRBG_ENTROPY_SOURCE_FAILED if the initial seeding has already taken place.
mbedtls_ctr_drbg_set_nonce_len() is called by 1 function:
![]()
mbedtls_ctr_drbg_set_nonce_len()
mbedtls_ctr_drbg_set_nonce_len() reads 1 variable and writes 1 variable:
![]()
mbedtls_ctr_drbg_set_nonce_len()