merkle – github.com/transparency-dev/merkle Index | Files | Directories

package merkle

import "github.com/transparency-dev/merkle"

Package merkle provides Merkle tree interfaces and implementation.

Index

Types

type LogHasher

type LogHasher interface {
	// EmptyRoot supports returning a special case for the root of an empty tree.
	EmptyRoot() []byte
	// HashLeaf computes the hash of a leaf that exists.
	HashLeaf(leaf []byte) []byte
	// HashChildren computes interior nodes.
	HashChildren(l, r []byte) []byte
	// Size returns the number of bytes the Hash* functions will return.
	Size() int
}

LogHasher provides the hash functions needed to compute dense merkle trees.

Source Files

hasher.go

Directories

PathSynopsis
compactPackage compact provides compact Merkle tree data structures.
proofPackage proof contains helpers for constructing log Merkle tree proofs.
rfc6962Package rfc6962 provides hashing functionality according to RFC6962.
testonlyPackage testonly contains code and data for testing Merkle trees, such as a reference implementation of in-memory Merkle tree.
Version
v0.0.2 (latest)
Published
May 5, 2023
Platform
linux/amd64
Last checked
4 days ago

Tools for package owners.