Add private key bytes to private key converter, address default on keyfile decode

This commit is contained in:
nolash
2021-07-20 17:46:19 +02:00
parent fe83a048ce
commit 8571447ce7
10 changed files with 21 additions and 6 deletions

View File

@@ -5,7 +5,7 @@ import logging
# local imports
from crypto_dev_signer.keystore import keyfile
import coincurve
from crypto_dev_signer.encoding import private_key_from_bytes
logg = logging.getLogger(__name__)
@@ -25,7 +25,7 @@ class Keystore:
def import_raw_key(self, b, password=None):
pk = coincurve.PrivateKey(secret=b)
pk = private_key_from_bytes(b)
return self.import_key(pk, password)