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 Summary
Constructors Constructor Description 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) -
Method Summary
Modifier and Type Method Description java.util.List<AdjacencyGraph>getAdjacencyGraphs()longgetCombinationAlgorithmTimeout()java.util.List<Dictionary>getDictionaries()java.util.ResourceBundlegetFeedbackResource()java.util.Map<java.lang.String,java.lang.Long>getGuessTypes()java.util.Map<java.lang.Character,java.lang.Character[]>getLeetTable()java.util.LocalegetLocale()java.util.ResourceBundlegetMainResource()java.lang.DoublegetMinimumEntropy()java.util.List<PasswordMatcher>getPasswordMatchers()java.util.regex.PatterngetYearPattern()booleanisDistanceCalc()
-
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 ofPasswordMatchers which will be used for matchingguessTypes- Map of types of guesses, and associated guesses/secdictionaries- List ofDictionaryto use for theDictionaryMatcheradjacencyGraphs- List of adjacency graphs to be used by theSpacialMatcherleetTable- Leet table for use withDictionaryMatcheryearPattern- RegexPatternfor use withYearMatcherminimumEntropy- Minimum entropy value passwords should meetlocale- Locale for localized text and feedbackdistanceCalc- Enable or disable levenshtein distance calculation for dictionary matchescombinationAlgorithmTimeout- Timeout for the findBestMatches algorithm
-
-
Method Details
-
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
- Returns:
- List of
Dictionaryto use for theDictionaryMatcher
-
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
Patternfor use withYearMatcher
-
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
-