|
@ -395,9 +395,9 @@ class Commands: |
|
|
def encrypt(self, pubkey, message): |
|
|
def encrypt(self, pubkey, message): |
|
|
return EC_KEY.encrypt_message(message, pubkey.decode('hex')) |
|
|
return EC_KEY.encrypt_message(message, pubkey.decode('hex')) |
|
|
|
|
|
|
|
|
def decrypt(self, private_key, message): |
|
|
def decrypt(self, secret, message): |
|
|
eck = EC_KEY(private_key.decode('hex')) |
|
|
ec = regenerate_key(secret) |
|
|
decrypted = eck.decrypt_message(message) |
|
|
decrypted = ec.decrypt_message(message) |
|
|
return decrypted[0] |
|
|
return decrypted[0] |
|
|
|
|
|
|
|
|
|
|
|
|
|
|