go-password-validator: github.com/lane-c-wagner/go-password-validator Index | Files

package passwordvalidator

import "github.com/lane-c-wagner/go-password-validator"


Package Files

base.go entropy.go length.go validate.go

func GetEntropy Uses

func GetEntropy(password string) float64

GetEntropy returns the entropy in bits for the given password See the ReadMe for more information

func Validate Uses

func Validate(password string, minEntropy float64) error

Validate returns nil if the password has greater than or equal to the minimum entropy. If not, an error is returned that explains how the password can be strengthened. This error is safe to show the client

Package passwordvalidator imports 4 packages (graph). Updated 2020-12-03. Refresh now. Tools for package owners.