Documentation ¶
Index ¶
Constants ¶
View Source
const LabelHashNestingDepth = 400
LabelHashNestingDepth is the number of recursive hashes per label.
Variables ¶
This section is empty.
Functions ¶
func GenLabelHashFunc ¶
GenLabelHashFunc generates hash functions for computing labels. The challenge is prepended to the data and the result is hashed using Sha256. TODO: use nested hashes based on a difficulty param.
func GenMerkleHashFunc ¶
func GenMerkleHashFunc(challenge []byte) merkle.HashFunc
GenMerkleHashFunc generates Merkle hash functions salted with a challenge. The challenge is prepended to the concatenation of the left- and right-child in the tree and the result is hashed using Sha256.
⚠️ The resulting function is NOT thread-safe, however different generated instances are independent.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.