File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 44# Made by Humans from OpenPeep
55# https://github.com/openpeep/valido
66
7- import pkg/ zxcvbn
7+ import pkg/ blackpaper
88
9- proc isStrongPassword * (input: string , defaultEntropy = 50.00 ): bool =
10- # # Checks given input and determine its strength
11- result = passwordEntropy (input) > defaultEntropy
9+ proc isStrongPassword * (input: string , defaultEntropy = 3.8 ): bool =
10+ # # Checks given input and determine its strength based on the `passwordStrength`
11+ # # function provided by the `pkg/blackpaper`
12+ # #
13+ # # Returns true if the password is classified as strong and meets the default entropy threshold.
14+ result = passwordStrength (input).strength == Strong and passwordStrength (input).score >= defaultEntropy
Original file line number Diff line number Diff line change @@ -11,7 +11,7 @@ skipDirs = @["data"]
1111
1212requires " nim >= 1.6.10"
1313requires " bigints"
14- requires " zxcvbn "
14+ requires " blackpaper "
1515
1616task dev, " dev" :
1717 echo " \n ✨ Compiling..." & " \n "
You can’t perform that action at this time.
0 commit comments