Menu

#19 case CHK16 calculated incorrectly from HxD

v1.0.12
closed-fixed
nobody
None
5
2017-03-05
2016-10-26
Anonymous
No

Hello,
While CRC32 and Checksum 8 is correctly calculated i can't say the same for checksum16.
Aren't we missing the carries?
This implementation seems different

http://www.netfor2.com/tcpsum.htm

HxD is reporting a correct value but hex2bin is not

Discussion

  • Jacques Pelletier

    I tried the string "123456789" with HxD: it gives 1DD which is the sum of 31 to 39 in hex.

    Hex2bin does the checksum16 calculation on word values: 3132+3334+3536+3738+39FF (B Endian) or 3231+3433+3635+3837+FF39 (L Endian). FF is a pad byte.

    I will add a checksum16 calculation on byte values in the next release.

    Thanks for your report!

     
  • Jacques Pelletier

    • status: open --> closed-fixed
     
  • Jacques Pelletier

    Implemented as -k 5 checksum method

     
MongoDB Logo MongoDB