Add function to get md info from md context
Signed-off-by: Max Fillinger <max@max-fillinger.net>
This commit is contained in:
parent
d65aeb3734
commit
0bb38336a5
3 changed files with 30 additions and 0 deletions
|
@ -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 ) );
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue