23 lines
418 B
C
23 lines
418 B
C
//
|
|
// Created by haraldwolff on 06.08.22.
|
|
//
|
|
|
|
#ifndef MKSPARSE_HASH_H
|
|
#define MKSPARSE_HASH_H
|
|
|
|
#include <stdint.h>
|
|
|
|
static inline uint64_t rol64(uint64_t word, unsigned int shift)
|
|
{
|
|
return (word << shift) | (word >> (64 - shift));
|
|
}
|
|
static inline uint64_t ror64(uint64_t word, unsigned int shift)
|
|
{
|
|
return (word >> shift) | (word << (64 - shift));
|
|
}
|
|
|
|
uint64_t dhash(void *data, int size);
|
|
|
|
|
|
#endif //MKSPARSE_HASH_H
|