password

package
v0.0.4 Latest Latest
Warning

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

Go to latest
Published: Jan 19, 2026 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsValidPassword

func IsValidPassword(password string, minLength int) error

IsValidPassword checks if a password meets minimum requirements

Types

type Hasher

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

Hasher handles password hashing and verification

func NewHasher

func NewHasher(cost int) *Hasher

NewHasher creates a new password hasher

func (*Hasher) Hash

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

Hash hashes a password using bcrypt

func (*Hasher) Verify

func (h *Hasher) Verify(password, hash string) error

Verify verifies a password against its hash

Jump to

Keyboard shortcuts

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