Browse Source

fix rc4-md5

auth
clowwindy 10 years ago
parent
commit
5024b300f1
  1. 7
      shadowsocks/crypto/rc4_md5.py

7
shadowsocks/crypto/rc4_md5.py

@ -43,12 +43,13 @@ def create_cipher(alg, key, iv, op, key_as_bytes=0, d=None, salt=None,
if not m2_not_found: if not m2_not_found:
try: try:
import M2Crypto.EVP import M2Crypto.EVP
return M2Crypto.EVP.Cipher('rc4', rc4_key, '', op, key_as_bytes=0, return M2Crypto.EVP.Cipher(b'rc4', rc4_key, b'', op,
d='md5', salt=None, i=1, padding=1) key_as_bytes=0, d='md5', salt=None, i=1,
padding=1)
except: except:
m2_not_found = True m2_not_found = True
from shadowsocks.crypto import ctypes_openssl 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 = { ciphers = {

Loading…
Cancel
Save