Esempio n. 1
0
 def test_invalid_key_type(self):
     with pytest.raises(TypeError, match="key must be bytes"):
         SEED(u"0" * 16)
Esempio n. 2
0
 def test_key_size(self):
     cipher = SEED(b"\x00" * 16)
     assert cipher.key_size == 128
Esempio n. 3
0
 def test_invalid_key_size(self):
     with pytest.raises(ValueError):
         SEED(b"\x00" * 17)
 def test_invalid_key_type(self):
     with pytest.raises(TypeError, match="key must be bytes"):
         SEED("0" * 16)  # type: ignore[arg-type]