mirror of
https://github.com/Luzifer/password.git
synced 2024-11-08 17:30:10 +00:00
Fixed godoc
This commit is contained in:
parent
ca37395d2f
commit
f612ebaceb
1 changed files with 4 additions and 3 deletions
|
@ -85,9 +85,10 @@ func (s *SecurePassword) GeneratePassword(length int, special bool) (string, err
|
|||
|
||||
// CheckPasswordSecurity executes three checks to ensure the passwords
|
||||
// meet the security considerations in this package:
|
||||
// - The password may not contain pattern found on the keyboard or in alphabet
|
||||
// - The password must have 3 or 4 different character groups in it
|
||||
// - The password may not have repeating characters
|
||||
//
|
||||
// 1. The password may not contain pattern found on the keyboard or in alphabet
|
||||
// 2. The password must have 3 or 4 different character groups in it
|
||||
// 3. The password may not have repeating characters
|
||||
func (s *SecurePassword) CheckPasswordSecurity(password string, needsSpecialCharacters bool) bool {
|
||||
return !s.hasInsecurePattern(password) &&
|
||||
s.matchesBasicSecurity(password, needsSpecialCharacters) &&
|
||||
|
|
Loading…
Reference in a new issue