- Changed ARC4 to use seperate input/output buffer

This commit is contained in:
Paul Bakker 2010-03-21 15:42:15 +00:00
parent f3ccc68100
commit baad6504d4
6 changed files with 30 additions and 21 deletions

View file

@ -169,11 +169,11 @@ int main( void )
set_alarm( 1 );
for( i = 1; ! alarmed; i++ )
arc4_crypt( &arc4, buf, BUFSIZE );
arc4_crypt( &arc4, BUFSIZE, buf, buf );
tsc = hardclock();
for( j = 0; j < 1024; j++ )
arc4_crypt( &arc4, buf, BUFSIZE );
arc4_crypt( &arc4, BUFSIZE, buf, buf );
printf( "%9lu Kb/s, %9lu cycles/byte\n", i * BUFSIZE / 1024,
( hardclock() - tsc ) / ( j * BUFSIZE ) );