mirror of
https://github.com/Mbed-TLS/mbedtls.git
synced 2024-12-26 18:20:21 +00:00
- Added SHA-512 benchmark
This commit is contained in:
parent
4593aeadaf
commit
3a3c3c2a55
@ -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 New Issue
Block a user