hash

package
v0.0.0-...-2db71d7 Latest Latest
Warning

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

Go to latest
Published: Aug 27, 2021 License: Apache-2.0 Imports: 7 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BuildMerkleTree

func BuildMerkleTree(hashType string, hashes [][]byte) ([][]byte, error)

take leaf node hash array and build merkle tree

func Get

func Get(hashType crypto.HashType, data []byte) ([]byte, error)

func GetByStrType

func GetByStrType(hashType string, data []byte) ([]byte, error)

func GetHashAlgorithm

func GetHashAlgorithm(hashType crypto.HashType) (hash.Hash, error)

func GetMerkleRoot

func GetMerkleRoot(hashType string, hashes [][]byte) ([]byte, error)

Types

type Hash

type Hash struct {
	// contains filtered or unexported fields
}

func (*Hash) Get

func (h *Hash) Get(data []byte) ([]byte, error)

Jump to

Keyboard shortcuts

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