hash

package
v0.0.0-...-84f9aa2 Latest Latest
Warning

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

Go to latest
Published: Feb 19, 2023 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// ErrInvalidHash invalid hash error
	ErrInvalidHash = errors.New("The encoded hash is not in the correct format")
	// ErrIncompatibleVersion incompatible hashing version
	ErrIncompatibleVersion = errors.New("Incompatible version of argon2")
)

Functions

func Generate

func Generate(password string) (string, error)

Generate generate hash from password

func VerifyPassword

func VerifyPassword(password, encodedHash string) (match bool, err error)

VerifyPassword verifies that posted password matches existing password hash

Types

This section is empty.

Jump to

Keyboard shortcuts

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