Skip to content

This is Murmur2 hash wrapper for Python.

Notifications You must be signed in to change notification settings

xxldao/zr_murmur2

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

30 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Murmur2

This is Murmur2 hash wrapper for Python.

This was forked and extended from https://www.github.com/orion46/murmur2

How to install

PIP install

You can install from pip:

pip install git+git://github.com/gsmcwhirter/zr_murmur2.git

Manual Install

If you want to install Murmur2 from a local download, execute the following script.

python setup.py install

How to use

Functions:

  • hash_32 (MurmurHash2 32-bit)
  • hash_32a (MurmurHash2A 32-bit -- Merkle-Damgard construction)
  • hash_32al (MurmurHashAligned2 32-bit)
  • hash_32n (MurmurHashNeutral2 32-bit)
  • hash_64a (MurmurHash64A 64-bit for 64-bit architecture)
  • hash_64b (MurmurHash64B 64-bit for 32-bit architecture)

Example:

import zr_murmur2

print zr_murmur2.hash_64a(key="test", seed=100)

The first argument, "test", is input to be hashed. The second argument is a seed. The seed is optional and defaults to 0.

You can pass parameters by position or keyword.

About

This is Murmur2 hash wrapper for Python.

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages

  • C++ 80.2%
  • Python 13.1%
  • C 6.7%