mirror of
https://github.com/OALabs/hashdb
synced 2026-06-08 12:05:11 +00:00
ed39b03997
the new test string is longer and more complex to cut down on false collisions
12 lines
215 B
Python
12 lines
215 B
Python
#!/usr/bin/env python
|
|
DESCRIPTION = "FNV1a hash"
|
|
TYPE = 'unsigned_int'
|
|
TEST_1 = 2603339342
|
|
|
|
|
|
def hash(data):
|
|
val = 0x811c9dc5
|
|
for c in data:
|
|
val = (0x1000193 * (c ^ val)) & 0xffffffff
|
|
return val
|