From 1ea401148c7279ae9c1e558f5c64911575c2e580 Mon Sep 17 00:00:00 2001 From: Still Hsu Date: Tue, 24 Jun 2025 11:59:21 +0800 Subject: [PATCH] Add TOnePipeShell hash 1313 Signed-off-by: Still Hsu --- algorithms/tonepipeshell_1313.py | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 algorithms/tonepipeshell_1313.py diff --git a/algorithms/tonepipeshell_1313.py b/algorithms/tonepipeshell_1313.py new file mode 100644 index 0000000..1153755 --- /dev/null +++ b/algorithms/tonepipeshell_1313.py @@ -0,0 +1,12 @@ +# Created by Still Hsu + +DESCRIPTION = "TOnePipeShell hash with seed 0x521 (1313)" +TYPE = 'unsigned_int' +TEST_1 = 3354381195 + + +def hash(data): + out_hash = 0 + for c in data: + out_hash = (c + 1313 * out_hash) & 0xffffffff + return out_hash