18 lines
310 B
C++
18 lines
310 B
C++
#ifndef _PEARSONHASH_H_
|
|
#define _PEARSONHASH_H_
|
|
|
|
|
|
#include <stdint.h>
|
|
|
|
class PearsonHash {
|
|
public:
|
|
static uint16_t calcHash16(const void* data, uint16_t len);
|
|
inline static bool checkHash16(uint16_t crc, const void* data, uint16_t len);
|
|
|
|
private:
|
|
static uint8_t _pearsonPermutation(uint8_t n);
|
|
};
|
|
|
|
|
|
#endif
|