Remove unnecessary imports from CryptMessage
This commit is contained in:
parent
f7c767c1c8
commit
59e0ffd8e0
1 changed files with 2 additions and 2 deletions
|
@ -1,12 +1,13 @@
|
||||||
import hashlib
|
import hashlib
|
||||||
import base64
|
import base64
|
||||||
|
import binascii
|
||||||
|
|
||||||
import lib.pybitcointools as btctools
|
import lib.pybitcointools as btctools
|
||||||
|
from util import ThreadPool
|
||||||
from Crypt import Crypt
|
from Crypt import Crypt
|
||||||
|
|
||||||
ecc_cache = {}
|
ecc_cache = {}
|
||||||
|
|
||||||
|
|
||||||
def eciesEncrypt(data, pubkey, ephemcurve=None, ciphername='aes-256-cbc'):
|
def eciesEncrypt(data, pubkey, ephemcurve=None, ciphername='aes-256-cbc'):
|
||||||
from lib import pyelliptic
|
from lib import pyelliptic
|
||||||
pubkey_openssl = toOpensslPublickey(base64.b64decode(pubkey))
|
pubkey_openssl = toOpensslPublickey(base64.b64decode(pubkey))
|
||||||
|
@ -40,7 +41,6 @@ def eciesDecrypt(encrypted_data, privatekey):
|
||||||
ecc_key = getEcc(privatekey)
|
ecc_key = getEcc(privatekey)
|
||||||
return ecc_key.decrypt(base64.b64decode(encrypted_data))
|
return ecc_key.decrypt(base64.b64decode(encrypted_data))
|
||||||
|
|
||||||
|
|
||||||
def split(encrypted):
|
def split(encrypted):
|
||||||
iv = encrypted[0:16]
|
iv = encrypted[0:16]
|
||||||
ciphertext = encrypted[16 + 70:-32]
|
ciphertext = encrypted[16 + 70:-32]
|
||||||
|
|
Loading…
Reference in a new issue