Try something like this:
#!/perl/bin/perl use warnings; use strict; use Crypt::RC4; my $foo1 = pack 'H*', 'C5C444220AD6FB08972792318300CC703814513EE013AF9 +7B94FF9ACF23F9C8F0E748C04B2E18BB5A1B491BB73E23EC9A4233B9BCDE4854FD03D +CBAC4B3E9EA00F5BF7A3A119B0FF2E66C9DD96E7F4F0972959082601AA5DD202DFB05 +039CA4FDC280517E244353690C0DE1A'; my $dt = localtime; print "$dt Start\n"; my $key = 'A'; my $ct; while ( 1 ) { my $ucrypt = RC4( $key, $foo1 ); if ( ++$ct == 10_000 ) { $dt = localtime; print "$dt count $ct key: $key\n"; $ct = 0; } if ( $ucrypt !~ /[\x80-\xFF]/ ) { print "matched using key:$key\n$ucrypt\n"; } $key++; }
In reply to Re: RC4 cipher performance
by jwkrahn
in thread RC4 cipher performance
by jaiello
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |