package testonly

import "github.com/google/trillian/merkle/testonly"

Package testonly contains code and data for testing Merkle trees.

Index

Functions

func CompactTrees

func CompactTrees() [][][]byte

CompactTrees returns a slice of compact.Tree internal hashes for all subsequent trees built from LeafInputs() using the RFC 6962 hashing strategy.

func EmptyRootHash

func EmptyRootHash() []byte

EmptyRootHash returns the root hash for an empty Merkle tree that uses SHA256-based strategy from RFC 6962.

func LeafInputs

func LeafInputs() [][]byte

LeafInputs returns a slice of leaf inputs for testing Merkle trees.

func NodeHashes

func NodeHashes() [][][]byte

NodeHashes returns a structured slice of node hashes for all complete subtrees of a Merkle tree built from LeafInputs() using the RFC 6962 hashing strategy. The first index in the slice is the tree level (zero being the leaves level), the second is the horizontal index within a level.

func RootHashes

func RootHashes() [][]byte

RootHashes returns a slice of Merkle tree root hashes for all subsequent trees built from LeafInputs() using the RFC 6962 hashing strategy. Hashes are indexed by tree size starting from an empty tree.

Source Files

constants.go

Version
v1.3.0
Published
Jul 11, 2019
Platform
js/wasm
Imports
1 packages
Last checked
7 hours ago

Tools for package owners.