(self, token: bytes | str, ttl: int | None = None)
| 82 | return base64.urlsafe_b64encode(basic_parts + hmac) |
| 83 | |
| 84 | def decrypt(self, token: bytes | str, ttl: int | None = None) -> bytes: |
| 85 | timestamp, data = Fernet._get_unverified_token_data(token) |
| 86 | if ttl is None: |
| 87 | time_info = None |
| 88 | else: |
| 89 | time_info = (ttl, int(time.time())) |
| 90 | return self._decrypt_data(data, timestamp, time_info) |
| 91 | |
| 92 | def decrypt_at_time( |
| 93 | self, token: bytes | str, ttl: int, current_time: int |