Skip to content

Commit

Permalink
Merge pull request #56 from Still34/patches/tonepipeshell
Browse files Browse the repository at this point in the history
Add alternative hashing seed for TOnePipeShell
  • Loading branch information
herrcore authored Jan 22, 2024
2 parents 108a534 + e285042 commit 231542f
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
2 changes: 1 addition & 1 deletion algorithms/tonepipeshell.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Created by Still Hsu <still@teamt5.org>

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

Expand Down
11 changes: 11 additions & 0 deletions algorithms/tonepipeshell_alt.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# Created by Still Hsu <still@teamt5.org>

DESCRIPTION = "TOnePipeShell hash with seed 0x4E44CB31 (1313131313)"
TYPE = 'unsigned_int'
TEST_1 = 3702427595

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

0 comments on commit 231542f

Please sign in to comment.