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

Method _verify_signature

src/cryptography/fernet.py:127–133  ·  view source on GitHub ↗
(self, data: bytes)

Source from the content-addressed store, hash-verified

125 return timestamp, data
126
127 def _verify_signature(self, data: bytes) -> None:
128 h = HMAC(self._signing_key, hashes.SHA256())
129 h.update(data[:-32])
130 try:
131 h.verify(data[-32:])
132 except InvalidSignature:
133 raise InvalidToken
134
135 def _decrypt_data(
136 self,

Callers 2

extract_timestampMethod · 0.95
_decrypt_dataMethod · 0.95

Calls 2

updateMethod · 0.45
verifyMethod · 0.45

Tested by

no test coverage detected