password

package
v0.4.5 Latest Latest
Warning

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

Go to latest
Published: Apr 9, 2024 License: BSD-2-Clause Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func MatchesPolicy

func MatchesPolicy(password string, policy Policy) bool

MatchesPolicy determines if a password matches the provided policy

Types

type Policy

type Policy struct {
	Length int `json:"length" toml:"length"` // Length is the minimum length allowed for a password.
	Lower  int `json:"lower" toml:"lower"`   // Lower is the number of lower case characters required.
	Number int `json:"number" toml:"number"` // Number is the number of special characters required.
	Other  int `json:"other" toml:"other"`   // Other is the number of other characters required. (ie special, mark, etc..)
	Upper  int `json:"upper" toml:"upper"`   // Upper is the number of upper case characters required.
}

Jump to

Keyboard shortcuts

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