1
0

commands: fix encrypt/decrypt

based on Electron-Cash/Electron-Cash@62aa08a0ff
This commit is contained in:
SomberNight
2019-05-03 03:10:31 +02:00
parent 387834164c
commit fd5b1acdc8
7 changed files with 44 additions and 18 deletions

View File

@@ -274,7 +274,7 @@ class ECPubkey(object):
verifying_key = _MyVerifyingKey.from_public_point(ecdsa_point, curve=SECP256k1)
verifying_key.verify_digest(sig_string, msg_hash, sigdecode=ecdsa.util.sigdecode_string)
def encrypt_message(self, message: bytes, magic: bytes = b'BIE1'):
def encrypt_message(self, message: bytes, magic: bytes = b'BIE1') -> bytes:
"""
ECIES encryption/decryption methods; AES-128-CBC with PKCS7 is used as the cipher; hmac-sha256 is used as the mac
"""