java.lang.Object
me.gosimple.nbvcxz.resources.DictionaryUtil
public class DictionaryUtil
extends java.lang.Object
- Author:
- Adam Brusselback
-
Field Summary
Fields Modifier and Type Field Description static java.lang.Stringeff_largeUnranked dictionary from the EFF password wordliststatic java.lang.StringenglishRanked dictionary of common English wordstatic java.lang.Stringfemale_namesRanked dictionary of common female namesstatic java.lang.Stringmale_namesRanked dictionary of common male namesstatic java.lang.StringpasswordsRanked dictionary of common passwordsstatic java.lang.StringsurnamesRanked dictionary of common surnames -
Constructor Summary
Constructors Constructor Description DictionaryUtil() -
Method Summary
Modifier and Type Method Description static java.util.Map<java.lang.String,java.lang.Integer>loadRankedDictionary(java.lang.String fileName)Read a resource file with a list of entries (sorted by frequency) and use it to create a ranked dictionary.static java.util.Map<java.lang.String,java.lang.Integer>loadUnrankedDictionary(java.lang.String fileName)Read a resource file with a list of entries (sorted by frequency) and use it to create a ranked dictionary.
-
Field Details
-
passwords
public static final java.lang.String passwordsRanked dictionary of common passwords- See Also:
- Constant Field Values
-
male_names
public static final java.lang.String male_namesRanked dictionary of common male names- See Also:
- Constant Field Values
-
female_names
public static final java.lang.String female_namesRanked dictionary of common female names- See Also:
- Constant Field Values
-
surnames
public static final java.lang.String surnamesRanked dictionary of common surnames- See Also:
- Constant Field Values
-
english
public static final java.lang.String englishRanked dictionary of common English word- See Also:
- Constant Field Values
-
eff_large
public static final java.lang.String eff_largeUnranked dictionary from the EFF password wordlist- See Also:
- Constant Field Values
-
-
Constructor Details
-
DictionaryUtil
public DictionaryUtil()
-
-
Method Details
-
loadUnrankedDictionary
public static java.util.Map<java.lang.String,java.lang.Integer> loadUnrankedDictionary(java.lang.String fileName)Read a resource file with a list of entries (sorted by frequency) and use it to create a ranked dictionary.The dictionary must contain only lower case values for the matching to work properly.
- Parameters:
fileName- the name of the file- Returns:
- the ranked dictionary (a
HashMapwhich associated a rank to each entry
-
loadRankedDictionary
public static java.util.Map<java.lang.String,java.lang.Integer> loadRankedDictionary(java.lang.String fileName)Read a resource file with a list of entries (sorted by frequency) and use it to create a ranked dictionary.The dictionary must contain only lower case values for the matching to work properly.
- Parameters:
fileName- the name of the file- Returns:
- the ranked dictionary (a
HashMapwhich associated a rank to each entry
-