Support compressed keys

This commit is contained in:
Ivanq 2020-03-30 09:16:12 +03:00
parent 56acac8cd3
commit 0a9a9b5a57
5 changed files with 31 additions and 13 deletions

View file

@ -32,7 +32,7 @@ def eciesDecryptMulti(encrypted_datas, privatekey):
def eciesDecrypt(ciphertext, privatekey):
return curve.decrypt(base64.b64decode(ciphertext), curve.wif_to_private(privatekey), derivation="sha512")
return curve.decrypt(base64.b64decode(ciphertext), curve.wif_to_private(privatekey.encode()), derivation="sha512")
def decodePubkey(pubkey):