edu.vt.middleware.password
Class DictionaryRule

java.lang.Object
  extended by edu.vt.middleware.password.AbstractDictionaryRule
      extended by edu.vt.middleware.password.DictionaryRule
All Implemented Interfaces:
Rule

public class DictionaryRule
extends AbstractDictionaryRule

DictionaryRule determines if a password matches a dictionary word. The checker will optionally also check for reversed words.

Version:
$Revision: 1841 $ $Date: 2011-02-25 14:05:47 -0500 (Fri, 25 Feb 2011) $
Author:
Middleware Services

Field Summary
 
Fields inherited from class edu.vt.middleware.password.AbstractDictionaryRule
dictionary, matchBackwards
 
Constructor Summary
DictionaryRule()
          This creates a new a new DictionaryRule without supplying a dictionary.
DictionaryRule(edu.vt.middleware.dictionary.Dictionary dict)
          This creates a new DictionaryRule with the supplied dictionary.
 
Method Summary
protected  java.lang.String doWordSearch(java.lang.String text)
          Searches the dictionary with the supplied text.
 
Methods inherited from class edu.vt.middleware.password.AbstractDictionaryRule
getDictionary, isMatchBackwards, setDictionary, setMatchBackwards, toString, validate
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

DictionaryRule

public DictionaryRule()
This creates a new a new DictionaryRule without supplying a dictionary. The dictionary should be set using the AbstractDictionaryRule.setDictionary(Dictionary) method.


DictionaryRule

public DictionaryRule(edu.vt.middleware.dictionary.Dictionary dict)
This creates a new DictionaryRule with the supplied dictionary. The dictionary should be ready to use when passed to this constructor.

Parameters:
dict - Dictionary to use for searching
Method Detail

doWordSearch

protected java.lang.String doWordSearch(java.lang.String text)
Searches the dictionary with the supplied text.

Specified by:
doWordSearch in class AbstractDictionaryRule
Parameters:
text - to search dictionary with
Returns:
String matching word


Copyright © 2003-2011 Virginia Tech. All Rights Reserved.