diff options
Diffstat (limited to 'tests/hazmat/primitives/test_chacha20.py')
-rw-r--r-- | tests/hazmat/primitives/test_chacha20.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/tests/hazmat/primitives/test_chacha20.py b/tests/hazmat/primitives/test_chacha20.py index 16ef97ed..33730d91 100644 --- a/tests/hazmat/primitives/test_chacha20.py +++ b/tests/hazmat/primitives/test_chacha20.py @@ -58,3 +58,7 @@ class TestChaCha20(object): with pytest.raises(TypeError): algorithms.ChaCha20(b"0" * 32, object()) + + def test_invalid_key_type(self): + with pytest.raises(TypeError, match="key must be bytes"): + algorithms.ChaCha20(u"0" * 32, b"0" * 16) |