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

Method test_key_size

tests/hazmat/primitives/test_ciphers.py:44–46  ·  view source on GitHub ↗
(self, key, keysize)

Source from the content-addressed store, hash-verified

42 [(b"0" * 32, 128), (b"0" * 48, 192), (b"0" * 64, 256)],
43 )
44 def test_key_size(self, key, keysize):
45 cipher = AES(binascii.unhexlify(key))
46 assert cipher.key_size == keysize
47
48 def test_invalid_key_size(self):
49 with pytest.raises(ValueError):

Callers

nothing calls this directly

Calls 2

AESClass · 0.90
unhexlifyMethod · 0.80

Tested by

no test coverage detected