Add function to get md info from md context

Signed-off-by: Max Fillinger <max@max-fillinger.net>
This commit is contained in:
Max Fillinger 2021-12-28 16:32:00 +01:00
parent d65aeb3734
commit 0bb38336a5
3 changed files with 30 additions and 0 deletions

View file

@ -137,6 +137,20 @@ const mbedtls_md_info_t *mbedtls_md_info_from_string( const char *md_name );
*/
const mbedtls_md_info_t *mbedtls_md_info_from_type( mbedtls_md_type_t md_type );
/**
* \brief This function returns the message-digest information
* from the given context.
*
* \param ctx The context from which to extract the information.
* This must be initialized (or \c NULL).
*
* \return The message-digest information associated with \p ctx.
* \return \c NULL if \p ctx is \c NULL.
*/
const mbedtls_md_info_t *mbedtls_md_info_from_ctx(
const mbedtls_md_context_t *ctx );
/**
* \brief This function initializes a message-digest context without
* binding it to a particular message-digest algorithm.