DirectoryMerkleTree module

class DirectoryMerkleTree.DirectoryMerkleTree(dmt_hash, children)

A simple tree implementation designed to contain Merkle tree information about a directory or file.

compare_trees()
get_updated_tree()
DirectoryMerkleTree.compute_tree_changes(dmt_new, dmt_old, directory_path='')

Compare the Merkle trees for two directories and return lists of the items added, updated, and delted.

DirectoryMerkleTree.get_all_paths(dmt, directory_path='')

Return the relative paths to all of the contents of a directory Merkle tree.

DirectoryMerkleTree.make_dmt(root_directory='/home/esmail/Documents/StrongBox/doc/source', nonce='', encrypter=None)

Generate a Merkle tree object for the directory provided. The resulting Merkle tree captures the state of the directory in the form of hierarchically generated hashes of the directories contents. A nonce can optionally be provided to facilitate remote verification of directory contents.

DirectoryMerkleTree.print_tree(tree)

Recursively print out the hash of the tree, the tree’s contents, and the printed output from those contents.

Previous topic

Communicator module

Next topic

Encrypter module

This Page