From 23a94c3ba1c0730b65496906c710edd19b6d6386 Mon Sep 17 00:00:00 2001 From: idaapayo Date: Mon, 24 Jan 2022 20:07:22 +0300 Subject: [PATCH] defaulting to scrypt in to_dict fun --- funga/eth/keystore/keyfile.py | 2 +- funga/eth/runnable/keyfile.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/funga/eth/keystore/keyfile.py b/funga/eth/keystore/keyfile.py index 6ad5b6b..6575795 100644 --- a/funga/eth/keystore/keyfile.py +++ b/funga/eth/keystore/keyfile.py @@ -97,7 +97,7 @@ class Ciphers: return ciphertext -def to_dict(private_key_bytes, kdf :str, passphrase=''): +def to_dict(private_key_bytes, kdf='scrypt', passphrase=''): private_key = coincurve.PrivateKey(secret=private_key_bytes) if kdf == 'scrypt': diff --git a/funga/eth/runnable/keyfile.py b/funga/eth/runnable/keyfile.py index ca82e04..738524e 100644 --- a/funga/eth/runnable/keyfile.py +++ b/funga/eth/runnable/keyfile.py @@ -79,7 +79,7 @@ def main(): else: pk_bytes = os.urandom(32) pk = coincurve.PrivateKey(secret=pk_bytes) - o = to_dict(pk_bytes, 'scrypt', passphrase) + o = to_dict(pk_bytes, passphrase) r = json.dumps(o) print(r)