Skip to content

Commit

Permalink
Merge pull request #46 from l3fdb33f/Mul3_add
Browse files Browse the repository at this point in the history
Adding algorithm seen in CS Loader
  • Loading branch information
herrcore authored Oct 12, 2023
2 parents 55e9299 + 6f5adb9 commit f0ef5b3
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions algorithms/mult3_add_init_9C.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
#!/usr/bin/env python

DESCRIPTION = "MULTIPLY 3 and ADD, starting key 0x9C"
TYPE = 'unsigned_int'
TEST_1 = 3481051867


def hash(data):
key = 0x9C
for byte in data:
dword = byte & 0xffffffff
key = (key * 3) & 0xffffffff
key = (key + dword) & 0xffffffff
return key

0 comments on commit f0ef5b3

Please sign in to comment.