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

Method decrypt

src/cryptography/fernet.py:200–206  ·  view source on GitHub ↗
(self, msg: bytes | str, ttl: int | None = None)

Source from the content-addressed store, hash-verified

198 return self._fernets[0]._encrypt_from_parts(p, timestamp, iv)
199
200 def decrypt(self, msg: bytes | str, ttl: int | None = None) -> bytes:
201 for f in self._fernets:
202 try:
203 return f.decrypt(msg, ttl)
204 except InvalidToken:
205 pass
206 raise InvalidToken
207
208 def decrypt_at_time(
209 self, msg: bytes | str, ttl: int, current_time: int

Callers 3

test_decryptMethod · 0.95
test_rotate_bytesMethod · 0.95
test_rotate_strMethod · 0.95

Calls 1

decryptMethod · 0.45

Tested by 3

test_decryptMethod · 0.76
test_rotate_bytesMethod · 0.76
test_rotate_strMethod · 0.76