34# define RABINKARP_SEED 1
41# define RABINKARP_MULT 0x08104225U
47# define RABINKARP_INVM 0x98f009adU
53# define RABINKARP_ADJ 0x08104224U
69void rabinkarp_update(
rabinkarp_t *sum,
const unsigned char *buf,
size_t len);
71static inline void rabinkarp_rotate(
rabinkarp_t *sum,
unsigned char out,
78static inline void rabinkarp_rollin(
rabinkarp_t *sum,
unsigned char in)
85static inline void rabinkarp_rollout(
rabinkarp_t *sum,
unsigned char out)
92static inline uint32_t rabinkarp_digest(
rabinkarp_t *sum)
struct rabinkarp rabinkarp_t
The rabinkarp_t state type.
#define RABINKARP_INVM
The RabinKarp inverse multiplier.
#define RABINKARP_MULT
The RabinKarp multiplier.
#define RABINKARP_ADJ
The RabinKarp seed adjustment.
#define RABINKARP_SEED
The RabinKarp seed value.
The rabinkarp_t state type.
uint32_t mult
The value of RABINKARP_MULT^count.
size_t count
Count of bytes included in sum.
uint32_t hash
The accumulated hash value.