Re: Better verification: checksum vs. xor
- From: CBFalconer <cbfalconer@xxxxxxxxx>
- Date: Tue, 23 Dec 2008 20:44:11 -0500
James Harris wrote:
I am looking for a simple way (usable on a powerful PC or a tiny
microcontroller) to verify a small amount of data of about eight
bytes.
Is it better to compare the data against a checksum or an xor of
the bytes?
I would do neither. I would compute a 16 bit CCIT crc during
transmission, and append those two bytes. The receiver can repeat
the process and compare the crcs. This is not sensitive to the
message length, but you will need to know it. The chance of an
undetected error is extremely low.
--
Merry Christmas, Happy Hanukah, Happy New Year
Joyeux Noel, Bonne Annee, Frohe Weihnachten
Chuck F (cbfalconer at maineline dot net)
<http://cbfalconer.home.att.net>
.
- Follow-Ups:
- Re: Better verification: checksum vs. xor
- From: Pascal J. Bourguignon
- Re: Better verification: checksum vs. xor
- From: James Harris
- Re: Better verification: checksum vs. xor
- References:
- Better verification: checksum vs. xor
- From: James Harris
- Better verification: checksum vs. xor
- Prev by Date: Re: programming articles
- Next by Date: Re: sorting of records with 0 and 1.
- Previous by thread: Re: Better verification: checksum vs. xor
- Next by thread: Re: Better verification: checksum vs. xor
- Index(es):
Relevant Pages
|