Caution
This project is now maintained in another organization: https://github.com/botify-labs/fnv-c
THIS REPOSITORY HERE IS THEREFORE IN ARCHIVE MODE
Python 3.7+ is a FNV0 hash library implemented in C through libffi.
- speed: 4 000% faster than basic Python implementation, 40% faster than
pyhash
- portability:
- tested with recent Python versions (3.7+)
- compatible with ARM64 and avoid too agressive CPU optimizations
- compatible with PyPy
- two variants: 32bits (
fnv0_32()
) and 64bits (fnv0_64()
)
- other hash algorithms (this library is about a specific algorithm)
pip install git+https://github.com/fabien-marty/fnv0.git#egg=fnv0
import fnv0
print(fnv0.fnv0_32(b"foo bar"))
print(fnv0.fnv0_64(b"foo bar"))
fnv0_32(data: bytes) -> int
fnv0_64(data: bytes) -> int
pip install -r dev-requirements.txt
python setup.py develop
# get all tasks (lint, test, clean...)
invoke --list