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