pass

package
v0.0.0-...-8dc6894 Latest Latest
Warning

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

Go to latest
Published: Sep 29, 2020 License: Unlicense Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// ErrHashFailed - signaling a hashing failure
	ErrHashFailed = errors.New("crypto: hash failed")
)

Functions

func GenerateRandomKey

func GenerateRandomKey(length int) []byte

GenerateRandomKey - wraps gorilla/securecookie's GenerateRandomKey

func Hash

func Hash(password string) (string, string, error)

Hash - generates the Argon2i hash of a given password returns the hash and the salt that was used to create the hash these values are base64 encoded

func VerifyHash

func VerifyHash(password, hash, salt string) bool

VerifyHash - takes a password, a base64 encoded hash, and a base64 encoded salt returns true if the password matches the hash

Types

This section is empty.

Jump to

Keyboard shortcuts

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