aboutsummaryrefslogtreecommitdiffstats
path: root/tests/hazmat/primitives/test_ciphers.py
diff options
context:
space:
mode:
Diffstat (limited to 'tests/hazmat/primitives/test_ciphers.py')
-rw-r--r--tests/hazmat/primitives/test_ciphers.py12
1 files changed, 11 insertions, 1 deletions
diff --git a/tests/hazmat/primitives/test_ciphers.py b/tests/hazmat/primitives/test_ciphers.py
index 9f8123eb..99ef043a 100644
--- a/tests/hazmat/primitives/test_ciphers.py
+++ b/tests/hazmat/primitives/test_ciphers.py
@@ -20,7 +20,7 @@ import pytest
from cryptography.exceptions import _Reasons
from cryptography.hazmat.primitives import ciphers
from cryptography.hazmat.primitives.ciphers.algorithms import (
- AES, ARC4, Blowfish, CAST5, Camellia, IDEA, TripleDES
+ AES, ARC4, Blowfish, CAST5, Camellia, IDEA, SEED, TripleDES
)
from cryptography.hazmat.primitives.ciphers.modes import ECB
@@ -127,6 +127,16 @@ class TestIDEA(object):
IDEA(b"\x00" * 17)
+class TestSEED(object):
+ def test_key_size(self):
+ cipher = SEED(b"\x00" * 16)
+ assert cipher.key_size == 128
+
+ def test_invalid_key_size(self):
+ with pytest.raises(ValueError):
+ SEED(b"\x00" * 17)
+
+
def test_invalid_backend():
pretend_backend = object()