Deserialize data structure from string.
(self, data)
| 46 | signer=self._cert.get_id()) |
| 47 | |
| 48 | def deserialize(self, data): |
| 49 | """Deserialize data structure from string.""" |
| 50 | assert self._cert_store is not None |
| 51 | with reraise_errors('Unable to deserialize: {0!r}', (Exception,)): |
| 52 | payload = self._unpack(data) |
| 53 | signature, signer, body = (payload['signature'], |
| 54 | payload['signer'], |
| 55 | payload['body']) |
| 56 | self._cert_store[signer].verify(body, signature, self._digest) |
| 57 | return loads(body, payload['content_type'], |
| 58 | payload['content_encoding'], force=True) |
| 59 | |
| 60 | def _pack(self, body, content_type, content_encoding, signer, signature, |
| 61 | sep=DEFAULT_SEPARATOR): |