Update to use Cryptodome for keccak instead of sha3

This commit is contained in:
Jason Rhinelander 2023-12-06 19:31:35 -04:00
parent 0cafbbaea2
commit 9de64972b6
No known key found for this signature in database
GPG Key ID: C4992CE7A88D4262
1 changed files with 2 additions and 2 deletions

View File

@ -22,7 +22,7 @@ import pysodium
import nacl.encoding
import nacl.hash
import base58
import sha3
from Cryptodome.Hash import keccak
import config
import local_config
from lmq import FutureJSON, omq_connection
@ -517,7 +517,7 @@ def show_ons(name, more_details=False):
network = b'\x73'
val = val[1:]
keccak_hash = sha3.keccak_256()
keccak_hash = keccak.new(digest_bits=256)
keccak_hash.update(network)
keccak_hash.update(val)
checksum = keccak_hash.digest()[0:4]