diff options
| author | ame <[email protected]> | 2024-03-26 13:03:34 -0500 |
|---|---|---|
| committer | ame <[email protected]> | 2024-03-26 13:03:34 -0500 |
| commit | 1969b6c40bb4cf99f5034deb957e330920397e9c (patch) | |
| tree | 92c3ca36793550864bbb32cf13ea0e606eab999b /src/hash/adler.h | |
| parent | 28df133ace7e3f0f899413972fde78a7f6a9c148 (diff) | |
docs and rolling adler
Diffstat (limited to 'src/hash/adler.h')
| -rw-r--r-- | src/hash/adler.h | 20 |
1 files changed, 12 insertions, 8 deletions
diff --git a/src/hash/adler.h b/src/hash/adler.h index 3bd8925..29a74f0 100644 --- a/src/hash/adler.h +++ b/src/hash/adler.h @@ -1,13 +1,17 @@ #include "../lua.h" #include <stdint.h> -/*! - * \brief calculates a adler hash of (len) bytes - * - * @param {uint8_t*} input bytes - * @param {size_t} input length - * @return {uint32_t} 32 bit hash -*/ -uint32_t i_adler32(uint8_t*, size_t); +struct adler32_hash { + uint16_t a; + uint16_t b; +}; + +struct adler32_hash adler32_init(); +void adler32_update(uint8_t*, size_t, struct adler32_hash*); +uint32_t adler32_final(struct adler32_hash*); +uint32_t adler32(uint8_t*, size_t); int l_adler32(lua_State*); +int l_adler32_init(lua_State*); +int l_adler32_update(lua_State*); +int l_adler32_final(lua_State*); |
