prepare for separation of ecc module:
- move encrypt/sign functions elsewhere - remove local dependencies in ecc.py, ecc_fast.py (except logging)
This commit is contained in:
@@ -716,7 +716,7 @@ class Commands:
|
||||
"""Verify a signature."""
|
||||
sig = base64.b64decode(signature)
|
||||
message = util.to_bytes(message)
|
||||
return ecc.verify_usermessage_with_address(address, sig, message)
|
||||
return bitcoin.verify_usermessage_with_address(address, sig, message)
|
||||
|
||||
@command('wp')
|
||||
async def payto(self, destination, amount, fee=None, feerate=None, from_addr=None, from_coins=None, change_addr=None,
|
||||
@@ -910,7 +910,7 @@ class Commands:
|
||||
except TypeError:
|
||||
raise UserFacingException(f"message must be a string-like object instead of {repr(message)}")
|
||||
public_key = ecc.ECPubkey(bfh(pubkey))
|
||||
encrypted = public_key.encrypt_message(message)
|
||||
encrypted = crypto.ecies_encrypt_message(public_key, message)
|
||||
return encrypted.decode('utf-8')
|
||||
|
||||
@command('wp')
|
||||
|
||||
Reference in New Issue
Block a user