From f472fc72de82d04505778d6d494ebc8c14b3e169 Mon Sep 17 00:00:00 2001 From: Brad Campbell Date: Mon, 24 Jul 2023 15:46:27 -0400 Subject: [PATCH] change to pure python siphash dep --- setup.py | 2 +- tockloader/tickv.py | 6 ++---- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/setup.py b/setup.py index fe6ce86..96282de 100644 --- a/setup.py +++ b/setup.py @@ -34,7 +34,7 @@ "crcmod >= 1.7", "pycryptodome >= 3.15.0", "pyserial >= 3.0.1", - "siphash24 >= 1.3", + "siphash >= 0.0.1", "toml >= 0.10.2", "tqdm >= 4.45.0 ", "questionary >= 1.10.0", diff --git a/tockloader/tickv.py b/tockloader/tickv.py index ecd2d6b..ea0ed3c 100644 --- a/tockloader/tickv.py +++ b/tockloader/tickv.py @@ -10,7 +10,7 @@ import textwrap import crcmod -import siphash24 +import siphash from .exceptions import TockLoaderException @@ -646,9 +646,7 @@ def _hash_key(self, key): Compute the SipHash24 for the given key. """ key_buffer = key.encode("utf-8") - h = siphash24.siphash24() - h.update(data=key_buffer) - return h.digest() + return siphash.SipHash_2_4(bytearray(16), key_buffer).digest() def _hash_key_int(self, key): """