diff options
author | Donald Stufft <donald@stufft.io> | 2013-08-09 07:28:31 -0400 |
---|---|---|
committer | Donald Stufft <donald@stufft.io> | 2013-08-09 07:28:31 -0400 |
commit | 5de0392f9be95fcd87db096a3176c172f01009da (patch) | |
tree | 5efee649acd6d864b39a8418bf1e97d29326a85f /tests/primitives/test_block.py | |
parent | 3704a8364daf6f7fa7d6a9298a82bdd2c151eb74 (diff) | |
download | cryptography-5de0392f9be95fcd87db096a3176c172f01009da.tar.gz cryptography-5de0392f9be95fcd87db096a3176c172f01009da.tar.bz2 cryptography-5de0392f9be95fcd87db096a3176c172f01009da.zip |
Properly decode plaintext before encrypting it
Diffstat (limited to 'tests/primitives/test_block.py')
-rw-r--r-- | tests/primitives/test_block.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/tests/primitives/test_block.py b/tests/primitives/test_block.py index b976e217..f2da5830 100644 --- a/tests/primitives/test_block.py +++ b/tests/primitives/test_block.py @@ -16,5 +16,6 @@ class TestBlockCipher(object): ciphers.AES(binascii.unhexlify(key)), modes.CBC(binascii.unhexlify(iv), padding.NoPadding()) ) - actual_ciphertext = cipher.encrypt(plaintext) + cipher.finalize() + actual_ciphertext = cipher.encrypt(binascii.unhexlify(plaintext)) + actual_ciphertext += cipher.finalize() assert binascii.hexlify(actual_ciphertext) == ciphertext |