I am trying to use fnv hash function on python-3.6, but I am getting an error
Traceback (most recent call last): File "C:/Users/SACHIN/AppData/Local/Programs/Python/Python36/bloom.py", line 4, in module fnv.hash(data, algorithm=fnv.fnv_1a, bits=64) File "C:\Users\SACHIN\AppData\Local\Programs\Python\Python36\lib\site-packages\fnv__init__.py", line 52, in hash OFFSET_BASIS[bits] File "C:\Users\SACHIN\AppData\Local\Programs\Python\Python36\lib\site-packages\fnv__init__.py", line 28, in fnv_1a return ensure_bits_count((hash_value ^ byte) * PRIMES[bits], bits) TypeError: unsupported operand type(s) for ^: 'int' and 'str'
For code
import fnv
data = 'my data'
fnv.hash(data, algorithm=fnv.fnv_1a, bits=64)
fnv.hash(data, bits=64)
fnv.hash(data, algorithm=fnv.fnv, bits=64)
which is exactly copied from https://pypi.python.org/pypi/fnv/0.2.0
Please let me know what actually is wrong.