Class Configuration

java.lang.Object
me.gosimple.nbvcxz.resources.Configuration

public class Configuration extends Object
Used to set any configurable parameters when estimating password strength.
Author:
Adam Brusselback.
  • Constructor Details

    • Configuration

      public Configuration(List<PasswordMatcher> passwordMatchers, Map<String,Long> guessTypes, List<Dictionary> dictionaries, List<AdjacencyGraph> adjacencyGraphs, Map<Character,Character[]> leetTable, Pattern yearPattern, Double minimumEntropy, Integer maxLength, Locale locale, boolean distanceCalc, long combinationAlgorithmTimeout)
      Parameters:
      passwordMatchers - The list of PasswordMatchers which will be used for matching
      guessTypes - Map of types of guesses, and associated guesses/sec
      dictionaries - List of Dictionary to use for the DictionaryMatcher
      adjacencyGraphs - List of adjacency graphs to be used by the SpacialMatcher
      leetTable - Leet table for use with DictionaryMatcher
      yearPattern - Regex Pattern for use with YearMatcher
      minimumEntropy - Minimum entropy value passwords should meet
      locale - Locale for localized text and feedback
      distanceCalc - Enable or disable levenshtein distance calculation for dictionary matches
      combinationAlgorithmTimeout - Timeout for the findBestMatches algorithm
  • Method Details

    • getPasswordMatchers

      public List<PasswordMatcher> getPasswordMatchers()
      Returns:
      List of PasswordMatchers which will be used for matching
    • getGuessTypes

      public Map<String,Long> getGuessTypes()
      Returns:
      Map of types of guesses, and associated guesses/sec
    • getDictionaries

      public List<Dictionary> getDictionaries()
      Returns:
      List of Dictionary to use for the DictionaryMatcher
    • getAdjacencyGraphs

      public List<AdjacencyGraph> getAdjacencyGraphs()
      Returns:
      List of adjacency graphs to be used by the SpacialMatcher
    • getLeetTable

      public Map<Character,Character[]> getLeetTable()
      Returns:
      Leet table for use with DictionaryMatcher
    • getYearPattern

      public Pattern getYearPattern()
      Returns:
      Regex Pattern for use with YearMatcher
    • getMinimumEntropy

      public Double getMinimumEntropy()
      Returns:
      Minimum entropy value passwords should meet
    • getMaxLength

      public Integer getMaxLength()
      Returns:
      Maximum length to estimate for password, anything longer will be truncated
    • getLocale

      public Locale getLocale()
      Returns:
      Locale for localized text and feedback
    • isDistanceCalc

      public boolean isDistanceCalc()
      Returns:
      If dictionary distance calculations are enabled or not
    • getCombinationAlgorithmTimeout

      public long getCombinationAlgorithmTimeout()
      Returns:
      Return the timeout for the findBestMatches algorithm
    • getMainResource

      public ResourceBundle getMainResource()
      Returns:
      Return the resource bundle which contains the text for everything but feedback
    • getFeedbackResource

      public ResourceBundle getFeedbackResource()
      Returns:
      Return the resource bundle which contains the text for feedback