hash

package
v0.9.3 Latest Latest
Warning

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

Go to latest
Published: Oct 28, 2023 License: Unlicense Imports: 12 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Blake2bSum

func Blake2bSum(b []byte) []byte

Blake2bSum ignores all errors and gives you a blakae2b 64 hash value as a byte slice. (or panics somehow)

func BlakeEqual

func BlakeEqual(a []byte, b []byte) bool

BlakeEqual will take in two byte slices, hash them with blake2b, and tell you if the resulting checksums match.

func BlakeFileChecksum added in v0.3.4

func BlakeFileChecksum(path string) (buf []byte, err error)

BlakeFileChecksum will attempt to calculate a blake2b checksum of the given file path's contents.

func Sum added in v0.5.5

func Sum(ht Type, b []byte) []byte

Types

type Type added in v0.5.5

type Type int8
const (
	TypeNull Type = iota
	TypeBlake2b
	TypeSHA1
	TypeSHA256
	TypeSHA512
	TypeMD5
)

Jump to

Keyboard shortcuts

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