making final review changes

This commit is contained in:
2022-01-24 15:12:38 +03:00
parent 0a4f3eaa98
commit 1c0047398a
6 changed files with 63 additions and 17 deletions

View File

@@ -66,10 +66,10 @@ class Hashes:
@staticmethod
def from_pbkdf2(kdfparams=pbkdf2_kdfparams, passphrase=''):
if kdfparams['prf'] == 'hmac-sha256':
kdfparams['prf'].replace('sha256')
kdfparams['prf'].replace('hmac-sha256','sha256')
derived_key = hashlib.pbkdf2_hmac(
hash_name=kdfparams['prf'],
hash_name='sha256',
password=passphrase.encode('utf-8'),
salt=bytes.fromhex(kdfparams['salt']),
iterations=int(kdfparams['c']),

View File

@@ -16,14 +16,7 @@ from funga.eth.keystore.keyfile import (
from_file,
to_dict,
)
# from pathlib import Path
# import sys
# path_root = Path(__file__).parents[1]
# sys.path.append(str(path_root))
# from keystore.testkeyfile import (
# from_file,
# to_dict
# )
from funga.eth.encoding import (
private_key_to_address,