blob: 5a1812160e3f6b6ab0c4d66632c67002b9362cb8 [file] [log] [blame]
from hypothesis import given
from hypothesis.strategies import binary
import pytest
from cryptography.fernet import Fernet
hypothesis = pytest.importorskip("hypothesis")
@given(binary())
def test_fernet(data):
f = Fernet(Fernet.generate_key())
ct = f.encrypt(data)
assert f.decrypt(ct) == data