1
0
mirror of https://github.com/Mbed-TLS/mbedtls.git synced 2025-08-01 10:06:53 +03:00

Change cipher prototypes for GCM

This commit is contained in:
Manuel Pégourié-Gonnard
2013-08-31 17:31:03 +02:00
parent 20d6a17af9
commit 9241be7ac5
9 changed files with 94 additions and 39 deletions

View File

@ -306,7 +306,7 @@ int main( int argc, char *argv[] )
fprintf( stderr, "cipher_setkey() returned error\n");
goto exit;
}
if( cipher_reset( &cipher_ctx, IV ) != 0 )
if( cipher_reset( &cipher_ctx, IV, 16, NULL, 0 ) != 0 )
{
fprintf( stderr, "cipher_reset() returned error\n");
goto exit;
@ -338,7 +338,7 @@ int main( int argc, char *argv[] )
}
}
if( cipher_finish( &cipher_ctx, output, &olen ) != 0 )
if( cipher_finish( &cipher_ctx, output, &olen, NULL, 0 ) != 0 )
{
fprintf( stderr, "cipher_finish() returned error\n" );
goto exit;
@ -424,7 +424,7 @@ int main( int argc, char *argv[] )
cipher_setkey( &cipher_ctx, digest, cipher_info->key_length,
POLARSSL_DECRYPT );
cipher_reset( &cipher_ctx, IV);
cipher_reset( &cipher_ctx, IV, 16, NULL, 0 );
md_hmac_starts( &md_ctx, digest, 32 );
@ -455,7 +455,7 @@ int main( int argc, char *argv[] )
/*
* Write the final block of data
*/
cipher_finish( &cipher_ctx, output, &olen );
cipher_finish( &cipher_ctx, output, &olen, NULL, 0 );
if( fwrite( output, 1, olen, fout ) != olen )
{