I am having a bit of a problem with Digest::CRC. I am testing some software handling bad packet headers, and I need to generate CRC8 checksums for a number of packets. However, when I use Digest::CRC to get the checksum for my sanity check packet, I'm not getting what I expect.
According to the best information I have, I should be getting 234 (or EA hex) for the string 7AEE840000187A011B80C001001100119103F3267D000000000000FF00000000. Instead I am getting 236 (or EC hex). Before I go chasing after errors elsewhere, I thought it might be best to run a sanity check past you guys, in case I am doing something wrong in my Perl and not seeing it. I appreciate your help. The code below is what is returning 236/0xEC when I expect 234/0xEA.
use Digest::CRC qw(crcccitt crc crc8 crcopenpgparmor);
my $pkt = "7AEE840000187A011B80C001001100119103F3267D000000000000FF000
my $crc = crc8($pkt);
print "$crc\t". cnv($crc,10,16) ."\n";