The friendly Operating System for the Internet of Things
Fletcher16

Fletcher16 checksum algorithm. More...

Detailed Description

Files

file  fletcher16.h
 

Functions

uint16_t fletcher16 (const uint8_t *buf, size_t bytes)
 Fletcher's 16 bit checksum. More...
 

Function Documentation

uint16_t fletcher16 ( const uint8_t *  buf,
size_t  bytes 
)

found on http://en.wikipedia.org/w/index.php?title=Fletcher%27s_checksum&oldid=661273016#Optimizations

Note
the returned sum is never 0
Parameters
bufinput buffer to hash
byteslength of buffer, in bytes
Returns
16 bit sized hash in the interval [1..65535]