Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/povilasb/pyfnv

FNV hash implementation in Python3
https://github.com/povilasb/pyfnv

Last synced: about 1 month ago
JSON representation

FNV hash implementation in Python3

Awesome Lists containing this project

README

        

=====
About
=====

This is a pure python implementation of FNV algorithm as specified in
http://isthe.com/chongo/tech/comp/fnv/.

Only works with Python 3.
And Python 2 is not planned to be supported.

Usage
=====

::

$ pip install fnv

.. code:: python

import fnv

data = 'my data'
fnv.hash(data, algorithm=fnv.fnv_1a, bits=64) # uses fnv.fnv_1a algorithm
fnv.hash(data, bits=64) # fnv.fnv_1a is a default algorithm
fnv.hash(data, algorithm=fnv.fnv, bits=64)