Search code examples
c++checksumdata-integrityhash-functioncryptographic-hash-function

How do I choose the right checksum for a simple C++ program, and how do I implement it?


I'm very new to checksums, and fairly new to programming. I have a fairly simple C++ program (measuring psi) that I'm transferring to an Arduino board. Would crc16 be OK or should I go with crc32 or would that be overkill?


Solution

  • A possible way to check that an executable has been correctly transmited to your Arduino board could be to use a simple checksum like md5, or even something even simpler, like some crude hash function computing a 16 bit hash. See e.g. this answer for inspiration.