diff --git a/algorithms/tonepipeshell.py b/algorithms/tonepipeshell.py index 779348b..e54d399 100644 --- a/algorithms/tonepipeshell.py +++ b/algorithms/tonepipeshell.py @@ -1,6 +1,6 @@ # Created by Still Hsu -DESCRIPTION = "TOnePipeShell hash with seed 0xC85E31" +DESCRIPTION = "TOnePipeShell hash with seed 0xC85E31 (13131313)" TYPE = 'unsigned_int' TEST_1 = 3454880715 diff --git a/algorithms/tonepipeshell_alt.py b/algorithms/tonepipeshell_alt.py new file mode 100644 index 0000000..6180680 --- /dev/null +++ b/algorithms/tonepipeshell_alt.py @@ -0,0 +1,11 @@ +# Created by Still Hsu + +DESCRIPTION = "TOnePipeShell hash with seed 0x4E44CB31 (1313131313)" +TYPE = 'unsigned_int' +TEST_1 = 3702427595 + +def hash(data): + out_hash = 0 + for c in data: + out_hash = (c + 0x4E44CB31 * out_hash) & 0xffffffff + return out_hash