convert-binhex/t/crc.t

16 lines
300 B
Perl
Raw Normal View History

2013-08-25 16:52:43 +00:00
use strict;
use warnings;
use Test::More;
2013-08-25 16:59:24 +00:00
use Convert::BinHex qw(binhex_crc macbinary_crc);
2013-08-25 16:52:43 +00:00
# Random data
my $data = "U1SBdxdMHpA2wlW3TOgUHXZ00jvHnkyU/ndXnr9RMElXdQXUAGYrPpf4F8jO";
my $crc = binhex_crc($data);
is($crc, 35360);
2013-08-25 16:59:24 +00:00
my $mac_crc = macbinary_crc($data);
is($crc, 35360);
2013-08-25 16:52:43 +00:00
done_testing();