This commit is contained in:
clowwindy
2014-08-27 00:17:26 +08:00
parent b468476c9c
commit 972bf22e6d
8 changed files with 19 additions and 16 deletions

View File

@ -154,7 +154,8 @@ class Encryptor(object):
iv = iv_
iv = iv[:m[1]]
if op == 1:
self.cipher_iv = iv[:m[1]] # this iv is for cipher not decipher
# this iv is for cipher not decipher
self.cipher_iv = iv[:m[1]]
if method != 'salsa20-ctr':
import M2Crypto.EVP
return M2Crypto.EVP.Cipher(method.replace('-', '_'), key, iv,