[comp.mail.uucp] Checksumming

cambler@polyslo.CalPoly.EDU (Fubar) (09/22/90)

I'm noticing interesting bugs in checksumming. I hope someone can
help out.

Of the 4 digit checksum, in the form 0xABCD (eg. 0x3F51 or 0x1234),
the A digit is always OK or off by 8, the B digit is always OK or off by 1,
the C digit is always OK or off by 8, and the D digit is always OK. Is there
some massaging that I am missing?

final_checksum = 0xAAAA - (checksum(data, SIZE) ^ (header[4] ^ 0xff));

right? the control byte is header[4]? [DLE][K][C0][C1][C][X] [data...]
                                        0   1  2   3   4  5


Argph!

-- 
++Christopher(); --- cambler@polyslo.calpoly.edu --- chris@fubarsys.slo.ca.us
---
Ever get the feeling that there is someone out there who understands you
completely?