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 ¶
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.
Click to show internal directories.
Click to hide internal directories.