password

package
v0.0.0-...-25e28b5 Latest Latest
Warning

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

Go to latest
Published: Jan 9, 2026 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Hasher

type Hasher struct {
	Memory      uint32
	Iterations  uint32
	SaltLength  uint32
	KeyLength   uint32
	Parallelism uint8
}

Hasher provides password hashing and verification using Argon2id.

func Default

func Default() *Hasher

Default returns a Hasher with recommended default parameters.

func (*Hasher) Hash

func (h *Hasher) Hash(password string) (string, error)

Hash generates a hashed password from the given plain text password.

func (*Hasher) Verify

func (h *Hasher) Verify(password, encodedHash string) bool

Verify checks if the provided password matches the encoded hash.

Jump to

Keyboard shortcuts

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