Class Configuration

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

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

    • Configuration

      public Configuration​(java.util.List<PasswordMatcher> passwordMatchers, java.util.Map<java.lang.String,​java.lang.Long> guessTypes, java.util.List<Dictionary> dictionaries, java.util.List<AdjacencyGraph> adjacencyGraphs, java.util.Map<java.lang.Character,​java.lang.Character[]> leetTable, java.util.regex.Pattern yearPattern, java.lang.Double minimumEntropy, java.util.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 java.util.List<PasswordMatcher> getPasswordMatchers()
      Returns:
      The list of PasswordMatchers which will be used for matching
    • getGuessTypes

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

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

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

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

      public java.util.regex.Pattern getYearPattern()
      Returns:
      Regex Pattern for use with YearMatcher
    • getMinimumEntropy

      public java.lang.Double getMinimumEntropy()
      Returns:
      Minimum entropy value passwords should meet
    • getLocale

      public java.util.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 java.util.ResourceBundle getMainResource()
      Returns:
      Return the resource bundle which contains the text for everything but feedback
    • getFeedbackResource

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