Skip to content

Commit

Permalink
change to pure python siphash dep
Browse files Browse the repository at this point in the history
  • Loading branch information
bradjc committed Jul 24, 2023
1 parent bd62f97 commit f472fc7
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
6 changes: 2 additions & 4 deletions tockloader/tickv.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
import textwrap

import crcmod
import siphash24
import siphash

from .exceptions import TockLoaderException

Expand Down Expand Up @@ -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):
"""
Expand Down

0 comments on commit f472fc7

Please sign in to comment.