Function esp_idf_sys::mbedtls_ctr_drbg_update
source ยท pub unsafe extern "C" fn mbedtls_ctr_drbg_update(
ctx: *mut mbedtls_ctr_drbg_context,
additional: *const c_uchar,
add_len: usize,
) -> c_int
Expand description
\brief This function updates the state of the CTR_DRBG context.
\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 The data to update the state with. This must not be \c NULL unless \p add_len is \c 0. \param add_len Length of \p additional in bytes. This must be at most #MBEDTLS_CTR_DRBG_MAX_SEED_INPUT.
\return \c 0 on success. \return #MBEDTLS_ERR_CTR_DRBG_INPUT_TOO_BIG if \p add_len is more than #MBEDTLS_CTR_DRBG_MAX_SEED_INPUT. \return An error from the underlying AES cipher on failure.