Skip to content

Commit

Permalink
fix rc4-md5
Browse files Browse the repository at this point in the history
  • Loading branch information
clowwindy committed Oct 31, 2014
1 parent be045f1 commit 5024b30
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions shadowsocks/crypto/rc4_md5.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,12 +43,13 @@ def create_cipher(alg, key, iv, op, key_as_bytes=0, d=None, salt=None,
if not m2_not_found:
try:
import M2Crypto.EVP
return M2Crypto.EVP.Cipher('rc4', rc4_key, '', op, key_as_bytes=0,
d='md5', salt=None, i=1, padding=1)
return M2Crypto.EVP.Cipher(b'rc4', rc4_key, b'', op,
key_as_bytes=0, d='md5', salt=None, i=1,
padding=1)
except:
m2_not_found = True
from shadowsocks.crypto import ctypes_openssl
return ctypes_openssl.CtypesCrypto('rc4', rc4_key, '', op)
return ctypes_openssl.CtypesCrypto(b'rc4', rc4_key, b'', op)


ciphers = {
Expand Down

0 comments on commit 5024b30

Please sign in to comment.