From 829ad28a66fae082f8d2e8df27164b52592a5ee6 Mon Sep 17 00:00:00 2001 From: ame Date: Mon, 6 Nov 2023 20:08:48 -0600 Subject: header stuff --- src/hash/xxh.h | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) (limited to 'src/hash/xxh.h') diff --git a/src/hash/xxh.h b/src/hash/xxh.h index 7dc3c8b..07e7579 100644 --- a/src/hash/xxh.h +++ b/src/hash/xxh.h @@ -1,4 +1,25 @@ #include "../lua.h" +#include + +/** + * calculates a xxhash32 of (len) bytes + * + * @param {uint8_t*} input bytes + * @param {uint32_t} hash seed + * @param {size_t} input length + * @return {uint32_t} 32 bit hash +*/ +uint32_t i_xxhash32(uint8_t*, uint32_t, size_t); + +/** + * calculates a xxhash64 of (len) bytes + * + * @param {uint8_t*} input bytes + * @param {uint64_t} hash seed + * @param {size_t} input length + * @return {uint64_t} 64 bit hash +*/ +uint64_t i_xxhash64(uint8_t*, uint64_t, size_t); int l_xxh32(lua_State*); int l_xxh64(lua_State*); -- cgit v1.2.3