in reply to Difficulty producing correct checksum
Have you considered simply using the checksum feature of unpack itself?
In addition to fields allowed in pack(), you may prefix a field with a %<number> to indicate that you want a <number>-bit checksum of the items instead of the items themselves. Default is a 16-bit checksum. Checksum is calculated by summing numeric values of expanded values (for string fields the sum of "ord($char)" is taken, for bit fields the sum of zeroes and ones).Or, if that isn't what you're trying to accomplish, what about Digest::MD5 or Digest::Adler32?
|
|---|