commit | ad89af11b234524e543284d3095a15905518ad70 | [log] [tgz] |
---|---|---|
author | Donald Stufft <donald@stufft.io> | Sat Aug 10 16:01:56 2013 -0400 |
committer | Donald Stufft <donald@stufft.io> | Sat Aug 10 16:01:56 2013 -0400 |
tree | 85634a84d21455faa897f5f4f6cbd62e4209a2e8 | |
parent | e9d8a777f2db59b11f745eb38d44f7257b40f5ab [diff] |
Ensure that AES gets a proper key size
diff --git a/tests/primitives/test_ciphers.py b/tests/primitives/test_ciphers.py index 31b4275..891c5cf 100644 --- a/tests/primitives/test_ciphers.py +++ b/tests/primitives/test_ciphers.py
@@ -27,3 +27,7 @@ def test_key_size(self, key, keysize): cipher = AES(binascii.unhexlify(key)) assert cipher.key_size == keysize + + def test_invalid_key_size(self): + with pytest.raises(ValueError): + AES(binascii.unhexlify(b"0" * 12))