TPickle -- TrustedPickle document
TPickle instances export the following attributes:
- Document's pickled data.
- Dictionary of PublicKey objects. Each key object is indexed by
its 128-bit public key value.
- Dictionary of Signature objects. Each signature object is
indexed by the signer's 128-bit public key value.
- Dictionary of dictionaries. Both the inner and outer dictionaries are
indexed with 128-bit public key values. Each
Trusted[Trustee][Truster] node contains a
TrustRelationship instance where Trustee is trusting
Truster. Each TrustRelationship instance is signed with
the Truster's private key.
TPickle instances export the following functions:
- Pickles the given data object or module into the TPickle
instance. Do not sign a document until after you have Pickled
- Reads the document from disk.
- Sets whether the file pickle data should be compressed when written to
disk. By default, compression is on. Compress defaults to
- Sign(PublicFile, Private[,
- Creates a valid Signature object where the
PublicFile's Owner is vouching for the document's
integrity. Call Write() after calling Sign(). If the
PrivateKey in Private does not match the Owner's
public key, then Sign() will throw a MismatchedKeys
exception. Setting IncludeTrusts to True (it defaults to
False) will include any of the Owner's "upstream" trust
Checks all signatures and trust relationships in the document against
the unordered list of Trusted and Revoked users. Both
lists are made up of 128-bit public key values.
TestSignatures returns a tuple of signature class code and a
list of public keys in the class. The possible codes are TRUSTED,
TRANSFERRED, UNKNOWN, and REVOKED.
- Unpickles the document data (or imports the pickled module) and returns
it. Documents can be unpickled even if the signatures are bad. Be sure to
call TestSignatures first!
- Writes the document to disk.