password

package
v1.118.1 Latest Latest
Warning

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

Go to latest
Published: May 13, 2024 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// ErrInvalidLength for password.
	ErrInvalidLength = errors.New("invalid length")

	// DefaultLength for password.
	DefaultLength = Length(64)
)

Module for fx.

Functions

This section is empty.

Types

type Length added in v1.13.0

type Length uint32

Length to generate password.

func (Length) Valid added in v1.13.0

func (l Length) Valid() error

Valid length.

type Secure added in v1.10.4

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

Secure password.

func NewSecure added in v1.10.4

func NewSecure(algo argon2.Algo) *Secure

NewSecure password.

func (*Secure) Compare added in v1.10.4

func (s *Secure) Compare(hash, pass string) error

Compare the password with the hash.

func (*Secure) Generate added in v1.10.4

func (s *Secure) Generate(length Length) (string, error)

Generate secure password.

func (*Secure) Hash added in v1.10.4

func (s *Secure) Hash(pass string) (string, error)

Hash the password.

Jump to

Keyboard shortcuts

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