digest: introduce FFI bindings for xxHash32/64
This patch introduces new hash types for digest module - xxHash32 and xxHash64. Closes #2003 @TarantoolBot document Title: digest module supports xxHash32/64 ```lua -- Examples below demonstrate xxHash32. -- xxHash64 has exactly the same interface -- Calculate the 32-bits hash (default seed is 0). digest.xxhash32(string[, seed]) -- Streaming -- Start a new hash by initializing state with a seed. -- If no value provided, 0 is used as default. xxhash = digest.xxhash32.new([seed]) -- Also it's possible to specify seed manually. If no value -- provided a value initially passed to "new" is used. -- Here and below "seed" expected to be unsigned -- number. Function returns nothing. xxhash:clear([seed]) -- Feed the hash state by calling "update" as many times as -- necessary. Function returns nothing. xxhash:update('string') -- Produce a hash value. xxhash:result() ```
Showing
- changelogs/unreleased/add-xxhash-to-digest-module.md 4 additions, 0 deletionschangelogs/unreleased/add-xxhash-to-digest-module.md
- src/exports.h 10 additions, 0 deletionssrc/exports.h
- src/lua/digest.lua 113 additions, 0 deletionssrc/lua/digest.lua
- test/app/digest.result 188 additions, 7 deletionstest/app/digest.result
- test/app/digest.test.lua 63 additions, 2 deletionstest/app/digest.test.lua
Loading
Please register or sign in to comment