testonly

package
v1.4.2 Latest Latest
Warning

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

Go to latest
Published: Jul 25, 2022 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Overview

Package testonly contains code and data for testing Merkle trees.

Deprecated: This package is superseded by the corresponding functionality in https://github.com/transparency-dev/merkle. It will be removed in future releases of Trillian.

Index

Constants

This section is empty.

Variables

This section is empty.

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.

Types

This section is empty.

Jump to

Keyboard shortcuts

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