mirror of
https://github.com/cryb-to/cryb-to.git
synced 2024-12-22 20:41:08 +00:00
Cite the Fletcher paper.
This commit is contained in:
parent
20cd7d6012
commit
1609b4e08a
3 changed files with 20 additions and 5 deletions
|
@ -37,7 +37,10 @@
|
||||||
#include <cryb/hash.h>
|
#include <cryb/hash.h>
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Simple implementation of Fletcher's checksum (16-bit version).
|
* Simple implementation of the 16-bit variant of Fletcher's checksum,
|
||||||
|
* described in Fletcher, J. G. (January 1982), "An Arithmetic Checksum
|
||||||
|
* for Serial Transmissions", IEEE Transactions on Communications. COM-30
|
||||||
|
* (1): 247–252, doi:10.1109/tcom.1982.1095369
|
||||||
*/
|
*/
|
||||||
uint16_t
|
uint16_t
|
||||||
fletcher16_hash(const void *data, size_t len)
|
fletcher16_hash(const void *data, size_t len)
|
||||||
|
|
|
@ -37,8 +37,14 @@
|
||||||
#include <cryb/hash.h>
|
#include <cryb/hash.h>
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Simple implementation of Fletcher's checksum (32-bit version). The
|
* Simple implementation of the 32-bit variant of Fletcher's checksum,
|
||||||
* input length is zero-padded to the nearest multiple of 2 bytes.
|
* described in Fletcher, J. G. (January 1982), "An Arithmetic Checksum
|
||||||
|
* for Serial Transmissions", IEEE Transactions on Communications. COM-30
|
||||||
|
* (1): 247–252, doi:10.1109/tcom.1982.1095369
|
||||||
|
*
|
||||||
|
* The paper assumes that the input length is a multiple of the checksum
|
||||||
|
* algorithm's word size (half the checksum size). This implementation
|
||||||
|
* will zero-pad the input up to the nearest multiple of the word size.
|
||||||
*/
|
*/
|
||||||
uint32_t
|
uint32_t
|
||||||
fletcher32_hash(const void *data, size_t len)
|
fletcher32_hash(const void *data, size_t len)
|
||||||
|
|
|
@ -37,8 +37,14 @@
|
||||||
#include <cryb/hash.h>
|
#include <cryb/hash.h>
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Simple implementation of Fletcher's checksum (64-bit version). The
|
* Simple implementation of the 64-bit variant of Fletcher's checksum,
|
||||||
* input length is zero-padded to the nearest multiple of 4 bytes.
|
* described in Fletcher, J. G. (January 1982), "An Arithmetic Checksum
|
||||||
|
* for Serial Transmissions", IEEE Transactions on Communications. COM-30
|
||||||
|
* (1): 247–252, doi:10.1109/tcom.1982.1095369
|
||||||
|
*
|
||||||
|
* The paper assumes that the input length is a multiple of the checksum
|
||||||
|
* algorithm's word size (half the checksum size). This implementation
|
||||||
|
* will zero-pad the input up to the nearest multiple of the word size.
|
||||||
*/
|
*/
|
||||||
uint64_t
|
uint64_t
|
||||||
fletcher64_hash(const void *data, size_t len)
|
fletcher64_hash(const void *data, size_t len)
|
||||||
|
|
Loading…
Reference in a new issue