Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions algorithms/mult21_add_170f.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
DESCRIPTION = "MULTIPLY 21 and ADD (0x170F base)"
TYPE = 'unsigned_int'
TEST_1 = 4233774810


def hash(data):
hash_value = 0x170F
for byte in data:
hash_value = (hash_value * 0x21 + byte) & 0xFFFFFFFF
return hash_value