pass

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Aug 6, 2024 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrSaltGeneration = errors.New("unable to generate salt")
	ErrBase64Decode   = errors.New("unable to decode base64")
	ErrInvalidHash    = errors.New("invalid hash")
)

Error vars for testing

Functions

func Hash

func Hash(pass string) (string, error)

Hash() hashes a string with Argon2id and encodes with Base64 for database.

func Verify

func Verify(pass string, encoded string) (bool, error)

Verify() decodes encoded parameter and verifies it with the pass paramater.

Types

This section is empty.

Jump to

Keyboard shortcuts

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