diff --git a/algorithms/custom_shift_add.py b/algorithms/custom_shift_add.py new file mode 100644 index 0000000..0490c6c --- /dev/null +++ b/algorithms/custom_shift_add.py @@ -0,0 +1,13 @@ +#!/usr/bin/env python + +DESCRIPTION = "shift+add with a custom initial value seen in a malware." +TYPE = "unsigned_int" +TEST_1 = 4294890437 + + +def hash(data): + result = 0x733e14f + for val in data: + result = (result << 1) + val + result &= 0xffffffff + return result