Run NodesReferenceutils

password

Package password

import "github.com/luxfi/node/utils/password"

Functions

IsValid

func IsValid(password string, minimumStrength Strength) error

IsValid returns nil if [password] is a reasonable length and has strength greater than or equal to [minimumStrength]

SufficientlyStrong

func SufficientlyStrong(password string, minimumStrength Strength) bool

SufficientlyStrong returns true if [password] has strength greater than or equal to [minimumStrength], scored by zxcvbn. This is the only implementation: a build tag must not decide how strong a password has to be.

Types

Hash

Hash of a password

func (h *Hash) Check(password string) bool
func (h *Hash) Set(password string) error

Strength

Strength is the strength of a password