HCoop
/
clinton
/
Smoothieware.git
/ blame
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
blob
|
blame
(incremental) |
history
|
HEAD
Making it clear issues are for issue ( Duh. )
[clinton/Smoothieware.git]
/
checksum.pl
Commit
Line
Data
b195040c
MM
1
#!/usr/bin/perl
2
3
use strict;
4
5
while (defined $ARGV[0]) {
6
my $s1 = 0;
7
my $s2 = 0;
8
my $str = shift @ARGV;
9
10
for (split //, $str) {
11
$s1 = ($s1 + (ord $_)) % 255;
12
$s2 = ($s2 + $s1) % 255;
13
};
14
printf "%s:\t%d\n", $str, ($s2<<8) + $s1;
15
}