pwhash

package
v0.0.0-...-e4b55f4 Latest Latest
Warning

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

Go to latest
Published: May 17, 2024 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (

	// ErrInvalidHash when hash is not in the correct formant
	ErrInvalidHash = errors.New("the encoded hash is not in the correct format")
	// ErrIncompatibleVersion in case of version incompatibility
	ErrIncompatibleVersion = errors.New("incompatible version of argon2")
)

Functions

func ComparePasswordWithHash

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

ComparePasswordWithHash to check password string with hash password

func HashPassword

func HashPassword(password string) (encodedHash string, err error)

HashPassword to create password hash

func InitArgonParams

func InitArgonParams(
	memory uint32,
	iterations uint32,
	parallelism uint8,
)

func InitArgonParamsFromEnv

func InitArgonParamsFromEnv(
	envA2memory string,
	envA2iterations string,
	envA2parallelism string,
)

Types

This section is empty.

Jump to

Keyboard shortcuts

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