passing filters
This commit is contained in:
parent
cb069df45f
commit
b5a8b8407d
|
@ -1,15 +1,17 @@
|
|||
package zxcvbn
|
||||
|
||||
import (
|
||||
"time"
|
||||
|
||||
"github.com/TheMacies/zxcvbn-go/match"
|
||||
"github.com/nbutton23/zxcvbn-go/matching"
|
||||
"github.com/nbutton23/zxcvbn-go/scoring"
|
||||
"github.com/nbutton23/zxcvbn-go/utils/math"
|
||||
"time"
|
||||
)
|
||||
|
||||
func PasswordStrength(password string, userInputs []string) scoring.MinEntropyMatch {
|
||||
func PasswordStrength(password string, userInputs []string, filters ...func(match.Matcher) bool) scoring.MinEntropyMatch {
|
||||
start := time.Now()
|
||||
matches := matching.Omnimatch(password, userInputs)
|
||||
matches := matching.Omnimatch(password, userInputs, filters...)
|
||||
result := scoring.MinimumEntropyMatchSequence(password, matches)
|
||||
end := time.Now()
|
||||
|
||||
|
|
Loading…
Reference in New Issue