Versions in this module Expand all Collapse all v0 v0.1.0 Apr 6, 2022 Changes in this version + var ErrNilProto = errors.New("cannot hash a nil protobuf message") + var ZeroHashes = [100][32]byte + func BitwiseMerkleize(hasher HashFn, chunks [][]byte, count, limit uint64) ([32]byte, error) + func CustomSHA256Hasher() func([]byte) [32]byte + func Depth(v uint64) (out uint8) + func Hash(data []byte) [32]byte + func HashKeccak256(data []byte) [32]byte + func Merkleize(hasher Hasher, count, limit uint64, leaf func(i uint64) []byte) (out [32]byte) + func MixInLength(root [32]byte, length []byte) [32]byte + func TransactionsRoot(txs [][]byte) ([32]byte, error) + type HashFn func(input []byte) [32]byte + type Hasher interface + Combi func(a [32]byte, b [32]byte) [32]byte + Hash func(a []byte) [32]byte + MixIn func(a [32]byte, i uint64) [32]byte + type HasherFunc struct + func NewHasherFunc(h HashFn) *HasherFunc + func (h *HasherFunc) Combi(a, b [32]byte) [32]byte + func (h *HasherFunc) Hash(a []byte) [32]byte + func (h *HasherFunc) MixIn(a [32]byte, i uint64) [32]byte