Skip to content

Commit

Permalink
Add TOnePipeShell hashing algo
Browse files Browse the repository at this point in the history
  • Loading branch information
Still34 committed Jan 19, 2024
1 parent d180cb4 commit f5e006c
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions algorithms/tonepipeshell.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# Created by Still Hsu <[email protected]>

DESCRIPTION = "TOnePipeShell hash with seed 0xC85E31"
TYPE = 'unsigned_int'
TEST_1 = 3454880715

def hash(data):
out_hash = 0
for c in data:
out_hash = (c + 0xC85E31 * out_hash) & 0xffffffff
return out_hash

0 comments on commit f5e006c

Please sign in to comment.