second pbkdf2 implementation

This commit is contained in:
2022-01-19 14:37:22 +03:00
parent 01598a8c59
commit 1f5d057a9a
2 changed files with 63 additions and 29 deletions

View File

@@ -16,6 +16,10 @@ from funga.eth.keystore.keyfile import (
from_file,
to_dict,
)
# from testkeyfile import (
# from_file,
# to_dict
# )
from funga.eth.encoding import (
private_key_to_address,
private_key_from_bytes,
@@ -77,7 +81,7 @@ def main():
else:
pk_bytes = os.urandom(32)
pk = coincurve.PrivateKey(secret=pk_bytes)
o = to_dict(pk_bytes, passphrase)
o = to_dict(pk_bytes, 'pbkdf2', passphrase)
r = json.dumps(o)
print(r)