From f6951c963303e3ecfbb4194dafe94ad9400e2284 Mon Sep 17 00:00:00 2001 From: clowwindy Date: Wed, 17 Sep 2014 13:54:33 +0800 Subject: [PATCH] fix m2 --- shadowsocks/crypto/m2.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/shadowsocks/crypto/m2.py b/shadowsocks/crypto/m2.py index cff3682..d69a468 100644 --- a/shadowsocks/crypto/m2.py +++ b/shadowsocks/crypto/m2.py @@ -36,7 +36,7 @@ def create_cipher(alg, key, iv, op, key_as_bytes=0, d=None, salt=None, i=1, padding=1): import M2Crypto.EVP - return M2Crypto.EVP.Cipher('rc4', key, iv, op, key_as_bytes=0, + return M2Crypto.EVP.Cipher(alg.replace('-', '_'), key, iv, op, key_as_bytes=0, d='md5', salt=None, i=1, padding=1)