simplemerkle

package
v1.1.4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 5, 2024 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func HashMerkleBranches

func HashMerkleBranches(left, right *hash.Hash) *hash.Hash

HashMerkleBranches takes two hashes, treated as the left and right tree nodes, and returns the hash of their concatenation. This is a helper function used to aid in the generation of a merkle tree.

Types

type Tree

type Tree struct {
	// contains filtered or unexported fields
}

func NewTreeFromHashes

func NewTreeFromHashes(hashes []hash.Hash) *Tree

func NewTreeFromSlices

func NewTreeFromSlices(slices [][]byte) *Tree

func (*Tree) Depth

func (tree *Tree) Depth() int

func (*Tree) Root

func (tree *Tree) Root() hash.Hash

func (*Tree) ToString

func (tree *Tree) ToString() string

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL