Skip to content

Commit c9df77d

Browse files
authored
Merge pull request #75 from Still34/patches/tonepipeshell-1313
Add TOnePipeShell hash 1313
2 parents 7d38d1d + 1ea4011 commit c9df77d

1 file changed

Lines changed: 12 additions & 0 deletions

File tree

algorithms/tonepipeshell_1313.py

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# Created by Still Hsu <still@teamt5.org>
2+
3+
DESCRIPTION = "TOnePipeShell hash with seed 0x521 (1313)"
4+
TYPE = 'unsigned_int'
5+
TEST_1 = 3354381195
6+
7+
8+
def hash(data):
9+
out_hash = 0
10+
for c in data:
11+
out_hash = (c + 1313 * out_hash) & 0xffffffff
12+
return out_hash

0 commit comments

Comments
 (0)