Class StrengthChecker
- java.lang.Object
-
- pl.edu.icm.unity.stdext.credential.pass.StrengthChecker
-
public class StrengthChecker extends Object
Checks strength of the password using zxcvbn derivative library and provide other simple quality measurements of passwords. The returned result is normalized to 0-1 range, 1 (max score) corresponds to currently very hard not normalized value of 14 or minimum acceptable value whichever is greater.- Author:
- K. Benedyczak
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classStrengthChecker.StrengthInfo
-
Constructor Summary
Constructors Constructor Description StrengthChecker()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static intgetCharacterClasses(String password)static booleanhasNoTrivialSequences(String password)static StrengthChecker.StrengthInfomeasure(String password, int minAcceptable, pl.edu.icm.unity.MessageSource msg)
-
-
-
Method Detail
-
measure
public static StrengthChecker.StrengthInfo measure(String password, int minAcceptable, pl.edu.icm.unity.MessageSource msg)
-
getCharacterClasses
public static int getCharacterClasses(String password)
-
hasNoTrivialSequences
public static boolean hasNoTrivialSequences(String password)
-
-