12uint16_t
crc16(
const uint8_t *buf,
size_t len);
16uint16_t
crc16ANSI(
const uint8_t *buf,
size_t len);
19uint16_t
crcCCITT(
const uint8_t *buf,
size_t len);
23uint32_t
crc32(
const uint8_t *buf,
size_t len);
27uint32_t
crc32FCS(
const uint8_t *buf,
size_t len);
30uint16_t
csum16(
const uint8_t *buf,
size_t len);
33uint16_t
xor16(
const uint8_t *buf,
size_t len);
36uint64_t
identity(
const uint8_t *buf,
size_t len);
A collection of hashing functions commonly used in network protocols.
Definition nethash.cpp:32
uint64_t identity(const uint8_t *buf, size_t len)
Identity hash – the first (up to) 64bits of the values (i.e. indexes 0 to 7).
Definition nethash.cpp:242
uint32_t crc32(const uint8_t *buf, size_t len)
Definition nethash.cpp:166
uint16_t crcCCITT(const uint8_t *buf, size_t len)
CRC16-CCITT (parameters: NO bit-reflection, polynomial 0x1021, init = ~0 and xor_out = 0).
Definition nethash.cpp:174
uint16_t csum16(const uint8_t *buf, size_t len)
16-bit ones' complement checksum (used in IP, TCP, UDP, ...).
Definition nethash.cpp:178
uint32_t crc32FCS(const uint8_t *buf, size_t len)
Definition nethash.cpp:170
uint16_t xor16(const uint8_t *buf, size_t len)
A 16-bit xor of the values.
Definition nethash.cpp:222
uint16_t crc16ANSI(const uint8_t *buf, size_t len)
Definition nethash.cpp:162
uint16_t crc16(const uint8_t *buf, size_t len)
CRC-16 used in BMv2 (parameters: bit-reflection, polynomial 0x8005, init = 0 and xor_out = 0).
Definition nethash.cpp:158