Esempio n. 1
0
 def test_invalid_key_type(self):
     with pytest.raises(TypeError, match="key must be bytes"):
         Camellia(u"0" * 32)
Esempio n. 2
0
 def test_key_size(self, key, keysize):
     cipher = Camellia(binascii.unhexlify(key))
     assert cipher.key_size == keysize
Esempio n. 3
0
 def test_invalid_key_size(self):
     with pytest.raises(ValueError):
         Camellia(binascii.unhexlify(b"0" * 12))
 def test_invalid_key_type(self):
     with pytest.raises(TypeError, match="key must be bytes"):
         Camellia("0" * 32)  # type: ignore[arg-type]