hash2

package
v0.0.0-...-d7c4e6e Latest Latest
Warning

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

Go to latest
Published: Feb 11, 2019 License: GPL-3.0 Imports: 5 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CompareChecksums

func CompareChecksums(first []byte, second []byte) bool

Compare two check sums. Return true if they are they same

func ComputeMd5Checksum

func ComputeMd5Checksum(data []byte) []byte

This returns the data's MD5 checksum.

WARNING: Do NOT Use MD5 in security contexts (defending against intentional manipulations of data from untrusted sources); use only for checking data integrity against machine errors.

func ComputeSha256Checksum

func ComputeSha256Checksum(data []byte) []byte

This returns the data's Sha256 checksum

func GetSha256HashString

func GetSha256HashString(data []byte) string

This returns the data's Sha256 checksum as a string representation

func GetSha256HashStringFromStream

func GetSha256HashStringFromStream(stream io.Reader) string

Return a hash from a stream reader

func ValidateMd5Checksum

func ValidateMd5Checksum(data []byte, sum []byte) bool

This returns true if the data matches the provided checksum.

func ValidateSha256Checksum

func ValidateSha256Checksum(data []byte, sum []byte) bool

This returns true if the data matches the provided checksum.

Types

This section is empty.

Jump to

Keyboard shortcuts

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