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