Skip to content
Permalink
Fetching contributors…
Cannot retrieve contributors at this time
|
#!/usr/bin/perl |
|
|
|
use strict; |
|
|
|
while (defined $ARGV[0]) { |
|
my $s1 = 0; |
|
my $s2 = 0; |
|
my $str = shift @ARGV; |
|
|
|
for (split //, $str) { |
|
$s1 = ($s1 + (ord $_)) % 255; |
|
$s2 = ($s2 + $s1) % 255; |
|
}; |
|
printf "%s:\t%d\n", $str, ($s2<<8) + $s1; |
|
} |
Something went wrong with that request. Please try again.
You signed in with another tab or window. Reload to refresh your session.
You signed out in another tab or window. Reload to refresh your session.