Documentation ¶
Index ¶
Constants ¶
View Source
const ( // HashSize contains the blocksize of the used hash function in bytes. HashSize = sha512.Size256 // IndexLen is the maximum number of levels in this Merkle Tree. IndexLen = HashSize * 8 )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Hash ¶
Hash represents the output of the hash function used in the sparse tree.
func NodeValues ¶
func NodeValues(mapID int64, hasher TreeHasher, bindex string, value []byte, nbrValues []Hash) []Hash
NodeValues computes the new values for leafs up the tree. nbrValues must not be compressed. value is the actual value of the leaf. NodeValues returns the leaf hash as part of the returned list.
type TreeHasher ¶
type TreeHasher interface { HashLeaf(mapID int64, index []byte, depth int, dataHash []byte) Hash HashInterior(left, right Hash) Hash HashEmpty(mapID int64, index []byte, depth int) Hash }
TreeHasher provides hash functions for tree implementations.
var CONIKSHasher TreeHasher = &coniks{}
CONIKSHasher implements the tree hashes described in CONIKS http://www.jbonneau.com/doc/MBBFF15-coniks.pdf
Click to show internal directories.
Click to hide internal directories.