Adapt cipher and MD layer with _init() and _free()

This commit is contained in:
Paul Bakker 2014-07-01 14:53:22 +02:00
parent accaffe2c3
commit 84bbeb58df
13 changed files with 134 additions and 47 deletions

View file

@ -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 );