- or download this
#!perl.exe
...
test_it("\xAA\xBB\xCC\xDD", 0, '4FCB'); # https://crccalc.com/?crc=AA
+BBCCDD&method=CRC-16/X-25&datatype=hex&outtype=0
test_it("\xDD\xCC\xBB\xAA", 0, 'F486'); # https://crccalc.com/?crc=DD
+CCBBAA&method=CRC-16/X-25&datatype=hex&outtype=0
done_testing;
- or download this
__END__
1680
...
ok 3 - test_it("\xAA\xBB\xCC\xDD", 0, 4FCB)
ok 4 - test_it("\xDD\xCC\xBB\xAA", 0, F486)
1..4
- or download this
#!perl
...
test_it(2864434397, 0, '1680'); # 2864434397
test_it("2864434397", 0, '1680'); # https://crccalc.com/?crc=286443439
+7&method=CRC-16/X-25&datatype=ascii&outtype=0
done_testing;
- or download this
__END__
1680
...
ok 6 - test_it(2864434397, 0, 1680)
ok 7 - test_it(2864434397, 0, 1680)
1..7