Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Content ¶
type Content interface { // This function returns SHA256 hash of the object. CalcHash() ([]byte, error) // Whether ths content equal another content. Equals(content Content) (bool, error) }
This defines the object that will get stored in Merkle tree.
type MerkleTree ¶
The Merkle tree object. It contains pointer to contents that are stored in it, as well as the tree root.
func (*MerkleTree) Init ¶
func (tree *MerkleTree) Init(contents []Content) error
This function inits a Merkle tree, it takes in a list of Content, and init the entire tree.
Click to show internal directories.
Click to hide internal directories.