Function esp_idf_sys::mbedtls_ctr_drbg_reseed
source ยท pub unsafe extern "C" fn mbedtls_ctr_drbg_reseed(
ctx: *mut mbedtls_ctr_drbg_context,
additional: *const c_uchar,
len: usize,
) -> c_int
Expand description
\brief This function reseeds the CTR_DRBG context, that is extracts data from the entropy source.
\note 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.
\param ctx The CTR_DRBG context. \param additional Additional data to add to the state. Can be \c NULL. \param len The length of the additional data. This must be less than #MBEDTLS_CTR_DRBG_MAX_SEED_INPUT - \c entropy_len where \c entropy_len is the entropy length configured for the context.
\return \c 0 on success. \return #MBEDTLS_ERR_CTR_DRBG_ENTROPY_SOURCE_FAILED on failure.