- Added SHA-512 benchmark

This commit is contained in:
Paul Bakker 2009-02-09 22:33:30 +00:00
parent 4593aeadaf
commit 3a3c3c2a55

View file

@ -143,6 +143,22 @@ int main( void )
( hardclock() - tsc ) / ( j * BUFSIZE ) );
#endif
#if defined(POLARSSL_SHA4_C)
printf( " SHA-512 : " );
fflush( stdout );
set_alarm( 1 );
for( i = 1; ! alarmed; i++ )
sha4( buf, BUFSIZE, tmp, 0 );
tsc = hardclock();
for( j = 0; j < 1024; j++ )
sha4( buf, BUFSIZE, tmp, 0 );
printf( "%9lu Kb/s, %9lu cycles/byte\n", i * BUFSIZE / 1024,
( hardclock() - tsc ) / ( j * BUFSIZE ) );
#endif
#if defined(POLARSSL_ARC4_C)
printf( " ARC4 : " );
fflush( stdout );