password

package
v0.99.36-0...-9dd75c3 Latest Latest
Warning

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

Go to latest
Published: Apr 2, 2026 License: Artistic-2.0 Imports: 9 Imported by: 0

Documentation

Overview

Package password configures argon2 to be compatible with Perl Convos.

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrInvalidHash         = errors.New("the encoded hash is not in the correct format")
	ErrIncompatibleVersion = errors.New("incompatible version of argon2")
	ErrUnsupportedFormat   = errors.New("unsupported hash format")
	ErrUnsupportedVariant  = errors.New("unsupported argon2 variant")
	ErrTooLongToken        = errors.New("the encoded hash is too long to be processed")
)

Functions

func ComparePassword

func ComparePassword(password, encodedHash string) (bool, error)

ComparePassword compares a password with a hash (Argon2 or Bcrypt).

func GenerateHash

func GenerateHash(password string) (string, error)

GenerateHash generates a hash for a password. It defaults to Argon2id for new hashes.

Types

This section is empty.

Jump to

Keyboard shortcuts

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