Browse Source

log method in encrypt unit test

auth
clowwindy 10 years ago
parent
commit
3e503bf677
  1. 2
      shadowsocks/encrypt.py

2
shadowsocks/encrypt.py

@ -179,6 +179,7 @@ def test_encryptor():
from os import urandom from os import urandom
plain = urandom(10240) plain = urandom(10240)
for method in CIPHERS_TO_TEST: for method in CIPHERS_TO_TEST:
logging.warn(method)
encryptor = Encryptor(b'key', method) encryptor = Encryptor(b'key', method)
cipher = encryptor.encrypt(plain) cipher = encryptor.encrypt(plain)
decryptor = Encryptor(b'key', method) decryptor = Encryptor(b'key', method)
@ -190,6 +191,7 @@ def test_encrypt_all():
from os import urandom from os import urandom
plain = urandom(10240) plain = urandom(10240)
for method in CIPHERS_TO_TEST: for method in CIPHERS_TO_TEST:
logging.warn(method)
cipher = encrypt_all(b'key', method, 1, plain) cipher = encrypt_all(b'key', method, 1, plain)
plain2 = encrypt_all(b'key', method, 0, cipher) plain2 = encrypt_all(b'key', method, 0, cipher)
assert plain == plain2 assert plain == plain2

Loading…
Cancel
Save