hash

package module
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Feb 7, 2024 License: MIT Imports: 8 Imported by: 0

README

Chainsmart Common Hash Functions

This package provides methods to hash data using sha3-512.

Installation

Use to go command:

go github.com/SolusiDataPintar/hash

Example

See hash_test.go for an example implementation at this time.

Resources

test file source from picsum

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Hash

func Hash(data ...[]byte) []byte

Hash generates a SHA3 hash from input byte arrays.

func HashFile

func HashFile(path string) ([]byte, error)

func HashReader

func HashReader(in io.Reader) ([]byte, error)

func HashSingle

func HashSingle(data []byte) []byte

func IsHashMatch

func IsHashMatch(data, hash []byte) int

func IsSHA256 deprecated

func IsSHA256(hash string) bool

Deprecated: In favor of sha3-512

func IsSha3512

func IsSha3512(hash []byte) bool

func IsSha3512Hex

func IsSha3512Hex(hash string) bool

func Sha256Byte deprecated

func Sha256Byte(value []byte) (string, error)

Deprecated: In favor of sha3-512

func Sha256String deprecated

func Sha256String(value string) (string, error)

Deprecated: In favor of sha3-512

func ValidateHash

func ValidateHash(hash []byte) error

func ValidateHashString

func ValidateHashString(hash string) error

func ValidateSHA256 deprecated

func ValidateSHA256(hash string) error

Deprecated: In favor of sha3-512

Types

This section is empty.

Jump to

Keyboard shortcuts

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