From 072c84f48df9e4a75201deb1eeb59eeb879fba9e Mon Sep 17 00:00:00 2001 From: Tressos-Aristomenis Date: Sat, 20 Jan 2024 04:24:40 +0200 Subject: [PATCH] 64-bit SDBM hash function with constant 65599 --- algorithms/sdbm_65599_x64.py | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 algorithms/sdbm_65599_x64.py diff --git a/algorithms/sdbm_65599_x64.py b/algorithms/sdbm_65599_x64.py new file mode 100644 index 0000000..8c66c88 --- /dev/null +++ b/algorithms/sdbm_65599_x64.py @@ -0,0 +1,10 @@ +DESCRIPTION = "The original SDBM hash function with the constant 65599. Used by Emotet malware." +TYPE = 'unsigned_long' +TEST_1 = 18326187587583583519 + + +def hash(data): + hsh = 0 + for d in data: + hsh = d + 0x1003f * hsh + return hsh & 0xffffffffffffffff