https://github.com/synodriver/lua-t1ha
lua binding for t1ha
https://github.com/synodriver/lua-t1ha
Last synced: about 1 year ago
JSON representation
lua binding for t1ha
- Host: GitHub
- URL: https://github.com/synodriver/lua-t1ha
- Owner: synodriver
- Created: 2022-07-27T02:57:17.000Z (almost 4 years ago)
- Default Branch: main
- Last Pushed: 2022-07-27T02:59:27.000Z (almost 4 years ago)
- Last Synced: 2025-02-14T00:24:04.611Z (over 1 year ago)
- Language: C
- Homepage:
- Size: 1000 Bytes
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.markdown
Awesome Lists containing this project
README
# lua-t1ha
```lua
local t1ha = require("t1ha")
local seed_x = 0
local seed_y = 1
print(t1ha.hash("dadadaad", seed_x))
print(t1ha.hash("dadadaad", seed_x))
print(t1ha.hash("dadadaa2d", seed_x))
print(t1ha.hash("dadadaa2d", seed_x))
print(t1ha.hash("dadadaa2d", seed_y))
print(t1ha.hash128("dadadaa2d", seed_x))
print(t1ha.hash128("dadadaa2d", seed_x))
print(t1ha.hash128("dadadaa2d", seed_y))
print(t1ha.hash128("dadadaa2d", seed_y))
local hasher = t1ha.newhasher(seed_x,seed_y)
hasher:update("assddd")
print(hasher:final())
local hasher2 = t1ha.newhasher(seed_x,seed_y)
hasher2:update("assddd")
print(hasher2:final())
```