diff options
| author | ame <[email protected]> | 2023-11-06 20:08:48 -0600 |
|---|---|---|
| committer | ame <[email protected]> | 2023-11-06 20:08:48 -0600 |
| commit | 829ad28a66fae082f8d2e8df27164b52592a5ee6 (patch) | |
| tree | 82df02dd802224f330470b2479afe24af14b3527 /src/hash/fletcher.h | |
| parent | 2b4f5bdf9ee42d321c2904da9595c11f9a7c592b (diff) | |
header stuff
Diffstat (limited to 'src/hash/fletcher.h')
| -rw-r--r-- | src/hash/fletcher.h | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/src/hash/fletcher.h b/src/hash/fletcher.h index ff08ac7..c77bce4 100644 --- a/src/hash/fletcher.h +++ b/src/hash/fletcher.h @@ -1,4 +1,32 @@ #include "../lua.h" +#include <stdint.h> + +/** + * calculates a fletcher hash of (len) bytes + * + * @param {uint8_t*} input bytes + * @param {size_t} input length + * @return {uint8_t} 8 bit hash +*/ +uint8_t i_fletcher8(uint8_t*,size_t); + +/** + * calculates a fletcher hash of (len) bytes + * + * @param {uint8_t*} input bytes + * @param {size_t} input length + * @return {uint16_t} 16 bit checksum +*/ +uint16_t i_fletcher16(uint8_t*,size_t); + +/** + * calculates a fletcher hash of (len) bytes + * + * @param {uint8_t*} input bytes + * @param {size_t} input length + * @return {uint32_t} 32 bit checksum +*/ +uint32_t i_fletcher32(uint8_t*,size_t); int l_fletcher32(lua_State*); int l_fletcher16(lua_State*); |
