review changes with tests

This commit is contained in:
2022-01-24 13:23:12 +03:00
parent b9c6db414b
commit b20853312d
3 changed files with 26 additions and 17 deletions

View File

@@ -16,10 +16,15 @@ from funga.eth.keystore.keyfile import (
from_file,
to_dict,
)
# from testkeyfile import (
# 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,
private_key_from_bytes,
@@ -81,7 +86,7 @@ def main():
else:
pk_bytes = os.urandom(32)
pk = coincurve.PrivateKey(secret=pk_bytes)
o = to_dict(pk_bytes, 'pbkdf2', passphrase)
o = to_dict(pk_bytes, 'scrypt', passphrase)
r = json.dumps(o)
print(r)