Class Scoring


  • public class Scoring
    extends java.lang.Object
    • 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
    • Constructor Detail

      • Scoring

        public Scoring​(Context context)
    • Method Detail

      • log10

        public static double log10​(double n)
      • 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.