| 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 |
| 94 | ) -> bytes: |
| 95 | if ttl is None: |
| 96 | raise ValueError( |
| 97 | "decrypt_at_time() can only be used with a non-None ttl" |
| 98 | ) |
| 99 | timestamp, data = Fernet._get_unverified_token_data(token) |
| 100 | return self._decrypt_data(data, timestamp, (ttl, current_time)) |
| 101 | |
| 102 | def extract_timestamp(self, token: bytes | str) -> int: |
| 103 | timestamp, data = Fernet._get_unverified_token_data(token) |