Skip to content
master
Go to file
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
 
 
 
 

README.md

murmurhash3

Murmurhash 3 for Lua

##Installation

$ sudo luarocks install --server=http://rocks.moonscript.org murmurhash3

Or build it manually:

gcc -O2 -fPIC -I/usr/include/lua5.1 -c lmurmurhash3.c -o lmurmurhash3.o
gcc -shared -o murmurhash3.so -L/usr/local/lib lmurmurhash3.o

Usage

local mmh3 = require "murmurhash3"

local seed = 0 -- (optional)
local data = "payload"

local hash = mmh3.hash32(data, seed)
local raw = mmh3.hash32(data, seed, true)

-- hash: 1120944743
-- raw: (4 byte)

License

Public domain

About

Murmurhash3 for Lua

Resources

License

Packages

No packages published
You can’t perform that action at this time.