I don't think this is it. I changed from
mCrc = crc(s, sizeof(s), mLookup, &mMask);
to
mCrc = crc(s, sizeof(s)-1, mLookup, &mMask);
and now, even though the results are different, they still don't agree.
perl try.pl
CRC for 'Hello Word. How are you?' is 0x8487fb61
gcc try.c; ./a.out
CRC for 'Hello Word. How are you?' is 0x7b78049e
I have a feeling the problem is the poly, or the reflections, or the initial poly or something like that - I just can't figure out what. | [reply] [d/l] [select] |
Okay ... here are a couple other things to try:
- Are you scanning through the bits in the correct order? I notice you're scanning LSB to MSB . Is that what the CRC wants?
- Try calculating a single character to see if your initial conditions match up.
...roboticus
| [reply] |