MCPcopy
hub / github.com/pyca/cryptography / test_invalid_key_size

Method test_invalid_key_size

tests/hazmat/primitives/test_ciphers.py:48–50  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

46 assert cipher.key_size == keysize
47
48 def test_invalid_key_size(self):
49 with pytest.raises(ValueError):
50 AES(binascii.unhexlify(b"0" * 12))
51
52 def test_invalid_key_type(self):
53 with pytest.raises(TypeError, match="key must be bytes"):

Callers

nothing calls this directly

Calls 2

AESClass · 0.90
unhexlifyMethod · 0.80

Tested by

no test coverage detected