From f5e006c06227729845101d548c4067f814d2f6f3 Mon Sep 17 00:00:00 2001 From: Still Hsu Date: Fri, 19 Jan 2024 13:55:32 +0800 Subject: [PATCH] Add TOnePipeShell hashing algo --- algorithms/tonepipeshell.py | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 algorithms/tonepipeshell.py diff --git a/algorithms/tonepipeshell.py b/algorithms/tonepipeshell.py new file mode 100644 index 0000000..779348b --- /dev/null +++ b/algorithms/tonepipeshell.py @@ -0,0 +1,11 @@ +# Created by Still Hsu + +DESCRIPTION = "TOnePipeShell hash with seed 0xC85E31" +TYPE = 'unsigned_int' +TEST_1 = 3454880715 + +def hash(data): + out_hash = 0 + for c in data: + out_hash = (c + 0xC85E31 * out_hash) & 0xffffffff + return out_hash \ No newline at end of file