From 5024b300f16b012785e008336e22fa49c980ad86 Mon Sep 17 00:00:00 2001 From: clowwindy Date: Fri, 31 Oct 2014 19:21:13 +0800 Subject: [PATCH] fix rc4-md5 --- shadowsocks/crypto/rc4_md5.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/shadowsocks/crypto/rc4_md5.py b/shadowsocks/crypto/rc4_md5.py index daa6ba5..e2d8aa4 100644 --- a/shadowsocks/crypto/rc4_md5.py +++ b/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: 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 = {