commit 0a648e2b1cdb7852d80c0626c62984ef01c1c7e9
parent ed6b2d0abf1bbe6c9b310634f760f1cce97c2c10
Author: ThomasV <thomasv@electrum.org>
Date: Tue, 17 Oct 2017 12:59:59 +0200
cleanup commented lines
Diffstat:
1 file changed, 0 insertions(+), 6 deletions(-)
diff --git a/lib/bitcoin.py b/lib/bitcoin.py
@@ -145,9 +145,6 @@ def aes_decrypt_with_iv(key, iv, data):
def EncodeAES(secret, s):
assert_bytes(s)
iv = bytes(os.urandom(16))
- # aes_cbc = pyaes.AESModeOfOperationCBC(secret, iv=iv)
- # aes = pyaes.Encrypter(aes_cbc)
- # e = iv + aes.feed(s) + aes.feed()
ct = aes_encrypt_with_iv(secret, iv, s)
e = iv + ct
return base64.b64encode(e)
@@ -155,9 +152,6 @@ def EncodeAES(secret, s):
def DecodeAES(secret, e):
e = bytes(base64.b64decode(e))
iv, e = e[:16], e[16:]
- # aes_cbc = pyaes.AESModeOfOperationCBC(secret, iv=iv)
- # aes = pyaes.Decrypter(aes_cbc)
- # s = aes.feed(e) + aes.feed()
s = aes_decrypt_with_iv(secret, iv, e)
return s