Go to the documentation of this file.
20 #ifndef CHECKSUM_FLETCHER16_H
21 #define CHECKSUM_FLETCHER16_H
51 uint16_t
fletcher16(
const uint8_t *buf,
size_t bytes);
uint16_t fletcher16(const uint8_t *buf, size_t bytes)
Fletcher's 16 bit checksum.
uint16_t sum1
First sum of the checksum.
void fletcher16_update(fletcher16_ctx_t *ctx, const uint8_t *data, size_t len)
Update the fletcher16 context with new data.
Fletcher's 16 bit checksum context struct.
uint16_t sum2
Second sum of the checksum.
void fletcher16_init(fletcher16_ctx_t *ctx)
Initialize a fletcher16 context.
uint16_t fletcher16_finish(fletcher16_ctx_t *ctx)
Finalize the checksum operation and return the checksum.