mirror of
https://github.com/Mbed-TLS/mbedtls.git
synced 2025-07-28 00:21:48 +03:00
Add function to get md info from md context
Signed-off-by: Max Fillinger <max@max-fillinger.net>
This commit is contained in:
@ -227,6 +227,15 @@ const mbedtls_md_info_t *mbedtls_md_info_from_type( mbedtls_md_type_t md_type )
|
||||
}
|
||||
}
|
||||
|
||||
const mbedtls_md_info_t *mbedtls_md_info_from_ctx(
|
||||
const mbedtls_md_context_t *ctx )
|
||||
{
|
||||
if( ctx == NULL )
|
||||
return NULL;
|
||||
|
||||
return( ctx->MBEDTLS_PRIVATE(md_info) );
|
||||
}
|
||||
|
||||
void mbedtls_md_init( mbedtls_md_context_t *ctx )
|
||||
{
|
||||
memset( ctx, 0, sizeof( mbedtls_md_context_t ) );
|
||||
|
Reference in New Issue
Block a user