(self, backend)
| 97 | f.decrypt(token.encode("ascii"), ttl=ttl_sec) |
| 98 | |
| 99 | def test_invalid_start_byte(self, backend): |
| 100 | f = Fernet(base64.urlsafe_b64encode(b"\x00" * 32), backend=backend) |
| 101 | with pytest.raises(InvalidToken): |
| 102 | f.decrypt(base64.urlsafe_b64encode(b"\x81")) |
| 103 | |
| 104 | def test_timestamp_too_short(self, backend): |
| 105 | f = Fernet(base64.urlsafe_b64encode(b"\x00" * 32), backend=backend) |