hash

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Jun 28, 2023 License: MIT Imports: 2 Imported by: 1

Documentation

Index

Constants

View Source
const HashSize = 32

Variables

This section is empty.

Functions

func CatAndHash

func CatAndHash(data [][]byte) []byte

CatAndHash concatenates all the elements in the slice together and then hashes.

func HashFunc

func HashFunc(data []byte) []byte

func HashMerkleBranches

func HashMerkleBranches(left []byte, right []byte) []byte

HashMerkleBranches takes two hashes, treated as the left and right tree nodes, and returns the hash of their concatenation. This is a helper function used to aid in the generation of a merkle tree.

func HashWithIndex

func HashWithIndex(data []byte, index uint64) []byte

HashWithIndex prepends the index to data before hashing.

Types

This section is empty.

Jump to

Keyboard shortcuts

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