Rename md_init_ctx() to md_setup()

This commit is contained in:
Manuel Pégourié-Gonnard 2015-03-25 16:29:51 +01:00
parent d4b9173269
commit abb674467b
16 changed files with 32 additions and 32 deletions

View file

@ -101,10 +101,10 @@ int main( int argc, char *argv[] )
aes_init( &aes_ctx );
md_init( &sha_ctx );
ret = md_init_ctx( &sha_ctx, md_info_from_type( POLARSSL_MD_SHA256 ), 1 );
ret = md_setup( &sha_ctx, md_info_from_type( POLARSSL_MD_SHA256 ), 1 );
if( ret != 0 )
{
polarssl_printf( " ! md_init_ctx() returned -0x%04x\n", -ret );
polarssl_printf( " ! md_setup() returned -0x%04x\n", -ret );
goto exit;
}

View file

@ -185,7 +185,7 @@ int main( int argc, char *argv[] )
polarssl_fprintf( stderr, "Message Digest '%s' not found\n", argv[5] );
goto exit;
}
md_init_ctx( &md_ctx, md_info, 1 );
md_setup( &md_ctx, md_info, 1 );
/*
* Read the secret key and clean the command line.

View file

@ -204,7 +204,7 @@ int main( int argc, char *argv[] )
polarssl_fprintf( stderr, "Message Digest '%s' not found\n", argv[1] );
return( 1 );
}
if( md_init_ctx( &md_ctx, md_info, 0 ) )
if( md_setup( &md_ctx, md_info, 0 ) )
{
polarssl_fprintf( stderr, "Failed to initialize context.\n" );
return( 1 );