From ea8e9fc0bd807c49318e12f6bbd2c2b43456feab Mon Sep 17 00:00:00 2001 From: Donald Stufft Date: Sat, 10 Aug 2013 15:22:28 -0400 Subject: Remove the padding from the BlockCipher API --- tests/primitives/test_block.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'tests/primitives/test_block.py') diff --git a/tests/primitives/test_block.py b/tests/primitives/test_block.py index aa670be3..799e5f03 100644 --- a/tests/primitives/test_block.py +++ b/tests/primitives/test_block.py @@ -15,21 +15,21 @@ import binascii import pytest -from cryptography.primitives.block import BlockCipher, ciphers, modes, padding +from cryptography.primitives.block import BlockCipher, ciphers, modes class TestBlockCipher(object): def test_cipher_name(self): cipher = BlockCipher( ciphers.AES(binascii.unhexlify(b"0" * 32)), - modes.CBC(binascii.unhexlify(b"0" * 32), padding.NoPadding()) + modes.CBC(binascii.unhexlify(b"0" * 32)) ) assert cipher.name == "AES-128-CBC" def test_use_after_finalize(self): cipher = BlockCipher( ciphers.AES(binascii.unhexlify(b"0" * 32)), - modes.CBC(binascii.unhexlify(b"0" * 32), padding.NoPadding()) + modes.CBC(binascii.unhexlify(b"0" * 32)) ) cipher.encrypt(b"a" * 16) cipher.finalize() @@ -41,7 +41,7 @@ class TestBlockCipher(object): def test_encrypt_with_invalid_operation(self): cipher = BlockCipher( ciphers.AES(binascii.unhexlify(b"0" * 32)), - modes.CBC(binascii.unhexlify(b"0" * 32), padding.NoPadding()) + modes.CBC(binascii.unhexlify(b"0" * 32)) ) cipher._operation = "decrypt" @@ -51,7 +51,7 @@ class TestBlockCipher(object): def test_finalize_with_invalid_operation(self): cipher = BlockCipher( ciphers.AES(binascii.unhexlify(b"0" * 32)), - modes.CBC(binascii.unhexlify(b"0" * 32), padding.NoPadding()) + modes.CBC(binascii.unhexlify(b"0" * 32)) ) cipher._operation = "wat" -- cgit v1.2.3