hashing

package
v0.0.0-...-f0b43a4 Latest Latest
Warning

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

Go to latest
Published: Feb 18, 2020 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetMerkleRootHash

func GetMerkleRootHash(input [][]byte) []byte

Returns the merkle root hash of the list of inputs

If there are no inputs a empty slice is returned, otherwise the merkle root is generated recursively

func MerkleRootHashOf

func MerkleRootHashOf(merkRHash []byte, sha256Hashes [][]byte) bool

MerkleRootHashCompare determines if the merkle-root hash is the merkle root of the array of hashes

func New

func New(data []byte) []byte

Hashes the given byte slice using SHA256 and returns it

Types

type SHA256Hash

type SHA256Hash struct {
	SecureHash []byte
}

func (SHA256Hash) Equals

func (hash SHA256Hash) Equals(bSlice []byte) bool

Equals returns true if the SHA256 hash is the hash of the given byte slice, false otherwise

Jump to

Keyboard shortcuts

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