git://git.novaco.in
/
electrum-nvc.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
(parent:
631c967
)
use standard format for private key passed to decrypt
author
ThomasV
<thomasv@gitorious>
Thu, 30 Jan 2014 13:57:32 +0000 (14:57 +0100)
committer
ThomasV
<thomasv@gitorious>
Thu, 30 Jan 2014 13:57:32 +0000 (14:57 +0100)
lib/commands.py
patch
|
blob
|
history
diff --git
a/lib/commands.py
b/lib/commands.py
index
bc307d2
..
00f60b5
100644
(file)
--- a/
lib/commands.py
+++ b/
lib/commands.py
@@
-395,9
+395,9
@@
class Commands:
def encrypt(self, pubkey, message):
return EC_KEY.encrypt_message(message, pubkey.decode('hex'))
- def decrypt(self, private_key, message):
- eck = EC_KEY(private_key.decode('hex'))
- decrypted = eck.decrypt_message(message)
+ def decrypt(self, secret, message):
+ ec = regenerate_key(secret)
+ decrypted = ec.decrypt_message(message)
return decrypted[0]