rainbow-dragon/Sources/CXXHash/include/cxxhash.h

20 lines
720 B
C

/* Forge shim over vendored xxHash v0.8.2 (BSD-2, Yann Collet).
Exposes stable one-shot + streaming XXH3-64/128 entry points for Swift. */
#ifndef CXXHASH_H
#define CXXHASH_H
#include <stddef.h>
#include <stdint.h>
typedef struct { uint64_t low64; uint64_t high64; } cxx_hash128;
uint64_t cxx_xxh3_64(const void *data, size_t len);
cxx_hash128 cxx_xxh3_128(const void *data, size_t len);
/* streaming */
typedef struct cxx_xxh3_state cxx_xxh3_state;
cxx_xxh3_state *cxx_xxh3_create(int is128);
void cxx_xxh3_update(cxx_xxh3_state *s, const void *data, size_t len);
uint64_t cxx_xxh3_digest64(cxx_xxh3_state *s);
cxx_hash128 cxx_xxh3_digest128(cxx_xxh3_state *s);
void cxx_xxh3_free(cxx_xxh3_state *s);
#endif