- Added SHA-512 benchmark
This commit is contained in:
parent
4593aeadaf
commit
3a3c3c2a55
1 changed files with 16 additions and 0 deletions
|
@ -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 );
|
||||
|
|
Loading…
Reference in a new issue