Skip to main content

mbedtls_hmac_drbg_random

Function mbedtls_hmac_drbg_random 

Source
pub unsafe extern "C" fn mbedtls_hmac_drbg_random(
    p_rng: *mut c_void,
    output: *mut c_uchar,
    out_len: usize,
) -> c_int
Expand description

\param p_rng The HMAC_DRBG context. This must be a pointer to a #mbedtls_hmac_drbg_context structure. \param output The buffer to fill. \param out_len The length of the buffer in bytes. This must be at most #MBEDTLS_HMAC_DRBG_MAX_REQUEST.

\return \c 0 if successful. \return #MBEDTLS_ERR_HMAC_DRBG_ENTROPY_SOURCE_FAILED if a call to the entropy source failed. \return #MBEDTLS_ERR_HMAC_DRBG_REQUEST_TOO_BIG if \p out_len > #MBEDTLS_HMAC_DRBG_MAX_REQUEST.