Documentation ¶
Index ¶
Constants ¶
View Source
const BlockSize = 32
Variables ¶
View Source
var ( TreeHeight = 40 DefaultHash = crypto.SHA1 BranchingFactor = 2 )
Functions ¶
Types ¶
type MerkleTree ¶
type MerkleTree struct {
// contains filtered or unexported fields
}
func (MerkleTree) BlockSize ¶
func (tree MerkleTree) BlockSize() int
func (*MerkleTree) Close ¶
func (tree *MerkleTree) Close()
Sending nil through tree will terminate all running goroutines
func (MerkleTree) Reset ¶
func (tree MerkleTree) Reset()
func (MerkleTree) Size ¶
func (tree MerkleTree) Size() int
func (*MerkleTree) Start ¶
func (tree *MerkleTree) Start()
func (MerkleTree) Sum ¶
func (tree MerkleTree) Sum(b []byte) []byte
Sum appends hash of underlaying data into b and returns the hash as well
Click to show internal directories.
Click to hide internal directories.