Class Result

java.lang.Object
me.gosimple.nbvcxz.scoring.Result

public class Result extends Object
This class contains all info about the entropy calculation.
Author:
Adam Brusselback
  • Constructor Details

  • Method Details

    • getEntropy

      public Double getEntropy()
      Returns the entropy for this Result.
      Returns:
      the estimated entropy as a double.
    • getGuesses

      public BigDecimal getGuesses()
      The estimated number of tries required to crack this password
      Returns:
      the estimated number of guesses as a BigDecimal
    • getMatches

      public List<Match> getMatches()
      The matches that comprise this result.
      Returns:
      a List of Match that were used in this result estimation.
    • getPassword

      public String getPassword()
      The password passed in truncated to maxLength.
      Returns:
      String of the truncated password.
    • getFullPassword

      public String getFullPassword()
      The original password passed in.
      Returns:
      String of the original password.
    • isTruncated

      public boolean isTruncated()
      Returns whether the password was truncated for estimation because it was longer than maxLength.
      Returns:
      true if the password was truncated; false if not.
    • isMinimumEntropyMet

      public boolean isMinimumEntropyMet()
      Returns whether the minimum entropy specified in the config was met.
      Returns:
      true if minimum entropy is met; false if not.
    • isRandom

      public boolean isRandom()
      Returns whether the password is considered to be random.
      Returns:
      true if the password is considered random, false otherwise.
    • getConfiguration

      public Configuration getConfiguration()
      Returns the configuration used to generate this result.
      Returns:
      Configuration that was used to generate this Result.
    • getFeedback

      public Feedback getFeedback()
      Returns feedback to the user to suggest ways to improve their password.
      Returns:
      a Feedback object with suggestions for the user.
    • getBasicScore

      public int getBasicScore()
      This scoring function returns an int from 0-4 to indicate the score of this password using the same semantics as zxcvbn.
      Returns:
      Score
      0: risky password: "too guessable"
      1: modest protection from throttled online attacks: "very guessable"
      2: modest protection from unthrottled online attacks: "somewhat guessable"
      3: modest protection from offline attacks: "safely unguessable" (assuming a salted, slow hash function)
      4: strong protection from offline attacks: "very unguessable" (assuming a salted, slow hash function)