password

package
v2.2.0 Latest Latest
Warning

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

Go to latest
Published: Apr 12, 2022 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func VerifyPassword

func VerifyPassword(pwd string) error

VerifyPassword checks whether the given password abides to the enforced password strength.

Types

type Password

type Password struct {
	Value string `json:"value"`
}

Password holds a hash password alongside its salt value.

func (*Password) Clear

func (password *Password) Clear()

Clear resets the password.

func (*Password) Compare

func (password *Password) Compare(pwd string) bool

Compare checks whether the given password string equals the stored one.

func (*Password) IsValid

func (password *Password) IsValid() bool

IsValid checks whether the password is valid.

func (*Password) Set

func (password *Password) Set(pwd string) error

Set sets a new password by hashing the plaintext version using bcrypt.

Jump to

Keyboard shortcuts

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