Skip to content

Commit

Permalink
update: hash library to
Browse files Browse the repository at this point in the history
  • Loading branch information
olivmath committed Oct 19, 2024
1 parent 4cf7972 commit e65baae
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions merkly/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"""

from typing import Callable, List, Tuple
from Crypto.Hash import keccak as cryptodome_keccak
import keccaky
import types


Expand Down Expand Up @@ -44,10 +44,8 @@ def keccak(data: bytes) -> bytes:
```
"""

keccak_256 = cryptodome_keccak.new(digest_bits=256)
keccak_256.update(data)
return keccaky.hash_it_bytes(data)

return keccak_256.digest()


def half(list_item: List[int]) -> Tuple[int, int]:
Expand Down

0 comments on commit e65baae

Please sign in to comment.