Class DictionaryUtil

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.String eff_large
    Unranked dictionary from the EFF password wordlist
    static java.lang.String english
    Ranked dictionary of common English word
    static java.lang.String female_names
    Ranked dictionary of common female names
    static java.lang.String male_names
    Ranked dictionary of common male names
    static java.lang.String passwords
    Ranked dictionary of common passwords
    static java.lang.String surnames
    Ranked 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.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

  • Constructor Details

  • 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 HashMap which 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 HashMap which associated a rank to each entry