From fe13c20dc1d1e5ce3e97aeecdce17855def39612 Mon Sep 17 00:00:00 2001 From: ImPerat0R_ Date: Tue, 28 Feb 2017 22:19:36 +0800 Subject: [PATCH] Correct spelling. (#755) thx --- shadowsocks/encrypt.py | 4 ++-- shadowsocks/udprelay.py | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/shadowsocks/encrypt.py b/shadowsocks/encrypt.py index ece72ec..a86058b 100644 --- a/shadowsocks/encrypt.py +++ b/shadowsocks/encrypt.py @@ -153,7 +153,7 @@ def encrypt_all_m(key, iv, m, method, data): return b''.join(result) -def dencrypt_all(password, method, data): +def decrypt_all(password, method, data): result = [] method = method.lower() (key_len, iv_len, m) = method_supported[method] @@ -228,7 +228,7 @@ def test_encrypt_all_m(): logging.warn(method) key, iv, m = gen_key_iv(b'key', method) cipher = encrypt_all_m(key, iv, m, method, plain) - plain2, key, iv = dencrypt_all(b'key', method, cipher) + plain2, key, iv = decrypt_all(b'key', method, cipher) assert plain == plain2 diff --git a/shadowsocks/udprelay.py b/shadowsocks/udprelay.py index 3a36cff..ba8299b 100644 --- a/shadowsocks/udprelay.py +++ b/shadowsocks/udprelay.py @@ -158,9 +158,9 @@ class UDPRelay(object): else: data = data[3:] else: - data, key, iv = encrypt.dencrypt_all(self._password, - self._method, - data) + data, key, iv = encrypt.decrypt_all(self._password, + self._method, + data) # decrypt data if not data: logging.debug(