|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectedu.vt.middleware.password.AbstractDictionaryRule
edu.vt.middleware.password.DictionarySubstringRule
public class DictionarySubstringRule
DictionarySubstringRule determines if a password matches a
dictionary word, or if it contains a dictionary word of a given minimum
length or greater. The checker will optionally also check for reversed words.
| Field Summary | |
|---|---|
static int |
DEFAULT_WORD_LENGTH
default word length. |
| Fields inherited from class edu.vt.middleware.password.AbstractDictionaryRule |
|---|
dictionary, matchBackwards |
| Constructor Summary | |
|---|---|
DictionarySubstringRule()
This creates a new a new DictionarySubstringRule without
supplying a dictionary. |
|
DictionarySubstringRule(edu.vt.middleware.dictionary.Dictionary dict)
This creates a new DictionarySubstringRule with the supplied
dictionary. |
|
DictionarySubstringRule(edu.vt.middleware.dictionary.Dictionary dict,
int n)
This will create a new DictionarySubstringRule with the
supplied dictionary and number of characters. |
|
| Method Summary | |
|---|---|
protected java.lang.String |
doWordSearch(java.lang.String text)
Searches the dictionary with the supplied text. |
int |
getWordLength()
This will return the number of characters that constitute a word in a password. |
void |
setWordLength(int n)
This sets the minimum number of characters that constitute a word in a password. |
| 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 |
| Field Detail |
|---|
public static final int DEFAULT_WORD_LENGTH
| Constructor Detail |
|---|
public DictionarySubstringRule()
DictionarySubstringRule without
supplying a dictionary. The dictionary should be set using the AbstractDictionaryRule.setDictionary(Dictionary) method.
public DictionarySubstringRule(edu.vt.middleware.dictionary.Dictionary dict)
DictionarySubstringRule with the supplied
dictionary. The dictionary should be ready to use when passed to this
constructor.
dict - Dictionary to use for searching
public DictionarySubstringRule(edu.vt.middleware.dictionary.Dictionary dict,
int n)
DictionarySubstringRule with the
supplied dictionary and number of characters. The dictionary should be
ready to use when passed to this constructor. See setWordLength(int).
dict - Dictionary to use for searchingn - int number of characters to check in each
dictionary word| Method Detail |
|---|
public void setWordLength(int n)
n - int minimum number of characters to check in each
dictionary wordpublic int getWordLength()
intprotected java.lang.String doWordSearch(java.lang.String text)
doWordSearch in class AbstractDictionaryRuletext - to search dictionary with
String matching word
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||