mbedtls_hmac_drbg_seed() function
Arguments
ctx
HMAC_DRBG context to be seeded.
md_info
MD algorithm to use for HMAC_DRBG.
f_entropy
int (*)(void *, unsigned char *, size_t)
The entropy callback, taking as arguments the \p p_entropy context, the buffer to fill, and the length of the buffer. \p f_entropy is always called with a length that is less than or equal to the entropy length.
p_entropy
The entropy context to pass to \p f_entropy.
custom
The personalization string. This can be \c NULL, in which case the personalization string is empty regardless of the value of \p len.
len
The length of the personalization string. This must be at most #MBEDTLS_HMAC_DRBG_MAX_INPUT and also at most #MBEDTLS_HMAC_DRBG_MAX_SEED_INPUT - \c entropy_len * 3 / 2 where \c entropy_len is the entropy length described above.
Return value
\c 0 if successful. #MBEDTLS_ERR_MD_BAD_INPUT_DATA if \p md_info is invalid. #MBEDTLS_ERR_MD_ALLOC_FAILED if there was not enough memory to allocate context data. #MBEDTLS_ERR_HMAC_DRBG_ENTROPY_SOURCE_FAILED if the call to \p f_entropy failed.
mbedtls_hmac_drbg_seed() is called by 1 function and calls 4 functions:
![]()
mbedtls_hmac_drbg_seed()
mbedtls_hmac_drbg_seed() reads 2 variables and writes 3 variables:
![]()
mbedtls_hmac_drbg_seed()