I am working to perform CRC32 on some HEX variables.
From the website
CRC32 for 50020301 (input type HEX) is 0xB5E76785
However, when I'm trying to use "hexdigest" apart of Digest::CRC:
my $one = "50020301";
$crc = Digest::CRC->new( type => "crc32" ) ;
print "The checksum of $one is $out \n";
The checksum of 1342309121 is 7a9735d9
It seems like Digest::CRC is doing ASCII CRC32.
I tried setting:
$one = 0x50020301;
But then Digest::CRC interprets that as Dec and converts that to HEX, before continuing ASCII CRC32.
Can someone give me some suggestions on how to do HEX CRC32?