package rfc6962
import "github.com/transparency-dev/merkle/rfc6962"
Package rfc6962 provides hashing functionality according to RFC6962.
Index ¶
Constants ¶
const ( RFC6962LeafHashPrefix = 0 RFC6962NodeHashPrefix = 1 )
Domain separation prefixes
Variables ¶
DefaultHasher is a SHA256 based LogHasher.
Types ¶
type Hasher ¶
Hasher implements the RFC6962 tree hashing algorithm.
func New ¶
New creates a new Hashers.LogHasher on the passed in hash function.
func (*Hasher) EmptyRoot ¶
EmptyRoot returns a special case for an empty tree.
func (*Hasher) HashChildren ¶
HashChildren returns the inner Merkle tree node hash of the two child nodes l and r. The hashed structure is NodeHashPrefix||l||r.
func (*Hasher) HashLeaf ¶
HashLeaf returns the Merkle tree leaf hash of the data passed in through leaf. The data in leaf is prefixed by the LeafHashPrefix.
Source Files ¶
- Version
- v0.0.2 (latest)
- Published
- May 5, 2023
- Platform
- linux/amd64
- Imports
- 2 packages
- Last checked
- 4 days ago –
Tools for package owners.