argon2

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Jun 26, 2026 License: AGPL-3.0 Imports: 9 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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