Fletcher32 checksum algorithm.
More...
Fletcher32 checksum algorithm.
◆ fletcher32()
uint32_t fletcher32 |
( |
const uint16_t * |
buf, |
|
|
size_t |
words |
|
) |
| |
◆ fletcher32_finish()
Finalize the checksum operation and return the checksum.
- Parameters
-
[in] | ctx | fletcher32 context |
- Returns
- 32 bit sized hash in the interval [1..2^32]
◆ fletcher32_init()
Initialize a fletcher32 context.
Multi-part version of fletcher32.
- Parameters
-
[in] | ctx | fletcher32 context to initialize |
◆ fletcher32_update()
void fletcher32_update |
( |
fletcher32_ctx_t * |
ctx, |
|
|
const void * |
data, |
|
|
size_t |
words |
|
) |
| |
Incrementally update the fletcher32 context with new data.
Can be an arbitrary amount of times with new data to checksum.
- Note
words
is the number of 16 bit words in the buffer
-
data
should contain an integer number of 16 bit words
- Parameters
-
[in] | ctx | fletcher32 context |
[in] | data | Data to add to the context |
[in] | words | Length of the data in 16 bit words |