mirror of
https://github.com/OALabs/hashdb
synced 2026-06-08 12:05:11 +00:00
Dropped djb2 implementation
This commit is contained in:
@@ -1,14 +0,0 @@
|
||||
#!/usr/bin/env python
|
||||
|
||||
DESCRIPTION = "djb2 hash"
|
||||
# Type can be either 'unsigned_int' (32bit) or 'unsigned_long' (64bit)
|
||||
TYPE = 'unsigned_int'
|
||||
# Test must match the exact has of the string 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789'
|
||||
TEST_1 = 205455184
|
||||
|
||||
|
||||
def hash(data):
|
||||
generated_hash = 5381
|
||||
for b in data:
|
||||
generated_hash = (generated_hash * 33 + b) & 0xFFFFFFFF
|
||||
return generated_hash
|
||||
Reference in New Issue
Block a user