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

Method test_encrypt

tests/test_fernet.py:168–173  ·  view source on GitHub ↗
(self, backend)

Source from the content-addressed store, hash-verified

166)
167class TestMultiFernet:
168 def test_encrypt(self, backend):
169 f1 = Fernet(base64.urlsafe_b64encode(b"\x00" * 32), backend=backend)
170 f2 = Fernet(base64.urlsafe_b64encode(b"\x01" * 32), backend=backend)
171 f = MultiFernet([f1, f2])
172
173 assert f1.decrypt(f.encrypt(b"abc")) == b"abc"
174
175 def test_decrypt(self, backend):
176 f1 = Fernet(base64.urlsafe_b64encode(b"\x00" * 32), backend=backend)

Callers

nothing calls this directly

Calls 4

decryptMethod · 0.95
encryptMethod · 0.95
FernetClass · 0.90
MultiFernetClass · 0.90

Tested by

no test coverage detected