Fletcher16¶
Fletcher16 checksum algorithm.
-
uint16_t
fletcher16
(const uint8_t * buf,msp430_types.h::size_t
bytes)¶ Fletcher’s 16 bit checksum.
found on http://en.wikipedia.org/w/index.php?title=Fletcher%27s_checksum&oldid=661273016#Optimizations
Note
the returned sum is never 0
Parameters
buf: input buffer to hash bytes: length of buffer, in bytes Return values
- 16 bit sized hash in the interval [1..65535]