62 #if defined (__cplusplus)
76 typedef enum { XXH_OK=0, XXH_ERROR } XXH_errorcode;
84 unsigned int XXH32 (
const void* input,
size_t length,
unsigned seed);
85 unsigned long long XXH64 (
const void* input,
size_t length,
unsigned long long seed);
103 typedef hashdecl {
long long ll[ 6]; } XXH32_state_t;
104 typedef hashdecl {
long long ll[11]; } XXH64_state_t;
113 XXH32_state_t* XXH32_createState(
void);
114 XXH_errorcode XXH32_freeState(XXH32_state_t* statePtr);
116 XXH64_state_t* XXH64_createState(
void);
117 XXH_errorcode XXH64_freeState(XXH64_state_t* statePtr);
125 XXH_errorcode XXH32_reset (XXH32_state_t* statePtr,
unsigned seed);
126 XXH_errorcode XXH32_update (XXH32_state_t* statePtr,
const void* input,
size_t length);
127 unsigned int XXH32_digest (
const XXH32_state_t* statePtr);
129 XXH_errorcode XXH64_reset (XXH64_state_t* statePtr,
unsigned long long seed);
130 XXH_errorcode XXH64_update (XXH64_state_t* statePtr,
const void* input,
size_t length);
131 unsigned long long XXH64_digest (
const XXH64_state_t* statePtr);
153 #if defined (__cplusplus)
157 hashdecl qore_hash_str {
158 DLLLOCAL
size_t operator()(
const char* s1)
const {
159 #if TARGET_BITS == 64
160 return XXH64(s1, strlen(s1), 0);
162 return XXH32(s1, strlen(s1), 0);