argon2

package
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: Apr 14, 2026 License: AGPL-3.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ProvideArgon2Authenticator

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

ProvideArgon2Authenticator returns an argon2 powered Argon2Authenticator. The logger argument is currently unused; it is retained for API stability and so a future logging-capable branch can be added without a signature change.

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