htr

package
v0.1.5 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 21, 2020 License: MIT Imports: 3 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ZeroHashes [][32]byte

Functions

func InitZeroHashes added in v0.0.8

func InitZeroHashes(hFn HashFn)

initialize the zero-hashes pre-computed data with the given hash-function.

Types

type HashFn

type HashFn func(input []byte) [32]byte

Warning, it implements a MerkleFn, but it is preferable to use a cached (Scratchpad) version of the merkle fn.

func (HashFn) Combi added in v0.0.2

func (h HashFn) Combi(a [32]byte, b [32]byte) [32]byte

func (HashFn) MixIn added in v0.0.2

func (h HashFn) MixIn(a [32]byte, i uint64) [32]byte

type HashTreeRootFn

type HashTreeRootFn func(mfn MerkleFn, pointer unsafe.Pointer) [32]byte

type MerkleFn added in v0.1.5

type MerkleFn interface {
	Combi(a [32]byte, b [32]byte) [32]byte
	MixIn(a [32]byte, i uint64) [32]byte
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL