diff --git a/plugins/CryptMessage/CryptMessage.py b/plugins/CryptMessage/CryptMessage.py index b7286e2e..b6c65673 100644 --- a/plugins/CryptMessage/CryptMessage.py +++ b/plugins/CryptMessage/CryptMessage.py @@ -1,12 +1,13 @@ import hashlib import base64 +import binascii import lib.pybitcointools as btctools +from util import ThreadPool from Crypt import Crypt ecc_cache = {} - def eciesEncrypt(data, pubkey, ephemcurve=None, ciphername='aes-256-cbc'): from lib import pyelliptic pubkey_openssl = toOpensslPublickey(base64.b64decode(pubkey)) @@ -40,7 +41,6 @@ def eciesDecrypt(encrypted_data, privatekey): ecc_key = getEcc(privatekey) return ecc_key.decrypt(base64.b64decode(encrypted_data)) - def split(encrypted): iv = encrypted[0:16] ciphertext = encrypted[16 + 70:-32]