MCPcopy Create free account
hub / github.com/amyasnikov/validity / from_object

Method from_object

validity/fields/encrypted.py:69–70  ·  view source on GitHub ↗
(cls, obj: Any, salt: bytes = b"")

Source from the content-addressed store, hash-verified

67class EncryptedObject(EncryptedString):
68 @classmethod
69 def from_object(cls, obj: Any, salt: bytes = b""):
70 return super().from_plain_text(pickle.dumps(obj), salt)
71
72 def decrypt(self) -> Any:
73 return pickle.loads(self._fernet.decrypt(self.cipher))

Callers

nothing calls this directly

Calls 1

from_plain_textMethod · 0.45

Tested by

no test coverage detected