Correct spelling. (#755)

thx
This commit is contained in:
ImPerat0R_ 2017-02-28 22:19:36 +08:00 committed by mengskysama
parent 8ac72b0b25
commit fe13c20dc1
2 changed files with 5 additions and 5 deletions

View file

@ -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

View file

@ -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(