crypt

package
v0.0.0-...-72d105d Latest Latest
Warning

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

Go to latest
Published: Jan 23, 2026 License: AGPL-3.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func VerifyPasswordHash

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

Types

type Config

type Config struct {
	KDF    string        `koanf:"kdf"`
	Argon2 argon2.Config `koanf:"argon2"`
	PBKDF2 pbkdf2.Config `koanf:"pbkdf2"`
}

type Crypt

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

func New

func New(cfg Config) (*Crypt, error)

func (*Crypt) SupportsPasswordUpdate

func (a *Crypt) SupportsPasswordUpdate() bool

func (*Crypt) UpdateUserPassword

func (a *Crypt) UpdateUserPassword(db db.Handler, email, password string) error

func (*Crypt) VerifyUserPassword

func (a *Crypt) VerifyUserPassword(db db.Handler, email, password string) (bool, error)

type PasswordHasher

type PasswordHasher interface {
	GenerateEncodedHash(password string) (string, error)
}

func NewPasswordHasher

func NewPasswordHasher(cfg Config) (PasswordHasher, error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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