Package com.nulabinc.zxcvbn
Class Scoring
- java.lang.Object
-
- com.nulabinc.zxcvbn.Scoring
-
public class Scoring extends java.lang.Object
-
-
Field Summary
Fields Modifier and Type Field Description static long
JS_NUMBER_MAX
static int
MIN_GUESSES_BEFORE_GROWING_SEQUENCE
static int
REFERENCE_YEAR
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description MatchSequence
calculateMostGuessableMatchSequence(java.lang.CharSequence password, java.util.List<Match> matches)
Calculates the most guessable match sequence for a password.MatchSequence
calculateMostGuessableMatchSequence(java.lang.CharSequence password, java.util.List<Match> matches, boolean excludeAdditive)
Calculates the most guessable match sequence for a password with an option to exclude additive.static double
log10(double n)
Strength
mostGuessableMatchSequence(java.lang.CharSequence password, java.util.List<Match> matches)
Deprecated.UsecalculateMostGuessableMatchSequence(java.lang.CharSequence, java.util.List<com.nulabinc.zxcvbn.matchers.Match>)
instead for better clarity and maintainability.Strength
mostGuessableMatchSequence(java.lang.CharSequence password, java.util.List<Match> matches, boolean excludeAdditive)
Deprecated.UsecalculateMostGuessableMatchSequence(java.lang.CharSequence, java.util.List<com.nulabinc.zxcvbn.matchers.Match>)
instead for better clarity and maintainability.
-
-
-
Field Detail
-
REFERENCE_YEAR
public static final int REFERENCE_YEAR
-
MIN_GUESSES_BEFORE_GROWING_SEQUENCE
public static final int MIN_GUESSES_BEFORE_GROWING_SEQUENCE
- See Also:
- Constant Field Values
-
JS_NUMBER_MAX
public static final long JS_NUMBER_MAX
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
Scoring
public Scoring(Context context)
-
-
Method Detail
-
log10
public static double log10(double n)
-
mostGuessableMatchSequence
@Deprecated public Strength mostGuessableMatchSequence(java.lang.CharSequence password, java.util.List<Match> matches)
Deprecated.UsecalculateMostGuessableMatchSequence(java.lang.CharSequence, java.util.List<com.nulabinc.zxcvbn.matchers.Match>)
instead for better clarity and maintainability.Calculates the most guessable match sequence for a password.
-
mostGuessableMatchSequence
@Deprecated public Strength mostGuessableMatchSequence(java.lang.CharSequence password, java.util.List<Match> matches, boolean excludeAdditive)
Deprecated.UsecalculateMostGuessableMatchSequence(java.lang.CharSequence, java.util.List<com.nulabinc.zxcvbn.matchers.Match>)
instead for better clarity and maintainability.Calculates the most guessable match sequence for a password with an option to exclude additive.
-
calculateMostGuessableMatchSequence
public MatchSequence calculateMostGuessableMatchSequence(java.lang.CharSequence password, java.util.List<Match> matches)
Calculates the most guessable match sequence for a password.- Parameters:
password
- The password to evaluate.matches
- A list of matches detected in the password.- Returns:
- A MatchSequence containing the most guessable sequence and associated guesses.
-
calculateMostGuessableMatchSequence
public MatchSequence calculateMostGuessableMatchSequence(java.lang.CharSequence password, java.util.List<Match> matches, boolean excludeAdditive)
Calculates the most guessable match sequence for a password with an option to exclude additive.- Parameters:
password
- The password to evaluate.matches
- A list of matches detected in the password.excludeAdditive
- If true, excludes additive computations from the guess estimation.- Returns:
- A MatchSequence containing the most guessable sequence and associated guesses.
-
-