mirror of
https://git.suyu.dev/suyu/mbedtls.git
synced 2025-12-21 21:36:21 +01:00
Adapt cipher and MD layer with _init() and _free()
This commit is contained in:
parent
accaffe2c3
commit
84bbeb58df
13 changed files with 134 additions and 47 deletions
|
|
@ -93,6 +93,8 @@ int hmac_drbg_init_buf( hmac_drbg_context *ctx,
|
|||
|
||||
memset( ctx, 0, sizeof( hmac_drbg_context ) );
|
||||
|
||||
md_init( &ctx->md_ctx );
|
||||
|
||||
if( ( ret = md_init_ctx( &ctx->md_ctx, md_info ) ) != 0 )
|
||||
return( ret );
|
||||
|
||||
|
|
@ -165,6 +167,8 @@ int hmac_drbg_init( hmac_drbg_context *ctx,
|
|||
|
||||
memset( ctx, 0, sizeof( hmac_drbg_context ) );
|
||||
|
||||
md_init( &ctx->md_ctx );
|
||||
|
||||
if( ( ret = md_init_ctx( &ctx->md_ctx, md_info ) ) != 0 )
|
||||
return( ret );
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue