Skip to content

Commit

Permalink
Correct spelling. (shadowsocks#755)
Browse files Browse the repository at this point in the history
thx
  • Loading branch information
tssujt authored and mengskysama committed Feb 28, 2017
1 parent 8ac72b0 commit fe13c20
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions shadowsocks/encrypt.py
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand Down Expand Up @@ -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


Expand Down
6 changes: 3 additions & 3 deletions shadowsocks/udprelay.py
Original file line number Diff line number Diff line change
Expand Up @@ -158,9 +158,9 @@ def _handle_server(self):
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(
Expand Down

0 comments on commit fe13c20

Please sign in to comment.