argon2

package
v2.0.1 Latest Latest
Warning

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

Go to latest
Published: Jun 29, 2026 License: AGPL-3.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ProvideArgon2Authenticator

func ProvideArgon2Authenticator(logger logging.Logger, tracerProvider tracing.TracerProvider) authentication.Authenticator

ProvideArgon2Authenticator returns an argon2 powered Argon2Authenticator.

Types

type Argon2Authenticator

type Argon2Authenticator struct {
	// contains filtered or unexported fields
}

Argon2Authenticator is our argon2-based authenticator.

func (*Argon2Authenticator) HashPassword

func (a *Argon2Authenticator) HashPassword(ctx context.Context, password string) (string, error)

HashPassword takes a password and hashes it using argon2.

func (*Argon2Authenticator) PasswordMatches

func (a *Argon2Authenticator) PasswordMatches(ctx context.Context, hash, password string) (bool, error)

PasswordMatches reports whether password matches the argon2id-encoded hash. A non-match returns (false, nil); only genuine errors (malformed hash, runtime failure) populate err.

Jump to

Keyboard shortcuts

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