|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--hcrypto.cipher.HistoricalKey | +--hcrypto.engines.PlayfairKey
Field Summary | |
static java.lang.String |
DEFAULT_KEY_DESCRIPTOR_PROMPT_STRING
A keyword description. |
static java.lang.String |
DEFAULT_KEYWORD_STRING
A default keyword. |
Fields inherited from class hcrypto.cipher.HistoricalKey |
alphabet, blocksize, keyDescriptorPrompt, keyspec, keyword |
Constructor Summary | |
PlayfairKey()
|
Method Summary | |
int |
findCharPosition(char ch)
Returns the position of the specified character. |
java.lang.String |
getAlgorithm()
Returns the algorithm name "Playfair". |
char |
getChar(int index)
Returns the character at the specified index. |
char |
getChar(int row,
int col)
Returns the character at the specified row and column. |
int |
getColIndex(int index)
Returns the column index for the specified index. |
int |
getLeftColIndex(int index)
Returns the left column index for the specified index. |
int |
getRightColIndex(int index)
Returns the right column index for the specified index. |
int |
getRowAboveIndex(int index)
Returns the row above the index for the specified index. |
int |
getRowBelowIndex(int index)
Returns the row below the index for the specified index. |
int |
getRowIndex(int index)
Returns the row index for the specified index. |
void |
init(java.lang.String keyspec)
Initializes the PlayfairKey with the specified keyspec. |
void |
printKeySquare()
Prints the playfair key to the System console. |
void |
testMethods()
Performs exhaustive tests of the methods that perform various indexing functions on the key. |
Methods inherited from class hcrypto.cipher.HistoricalKey |
getAlphabet, getBlocksize, getInstance, getKeyDescriptorPrompt, getKeyword, initKey, removeDuplicateChars |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final java.lang.String DEFAULT_KEY_DESCRIPTOR_PROMPT_STRING
public static final java.lang.String DEFAULT_KEYWORD_STRING
Constructor Detail |
public PlayfairKey()
Method Detail |
public void init(java.lang.String keyspec) throws java.lang.Exception
init
in class HistoricalKey
keySpec
- takes the form "keyword/alphabet", i.e. "ralph/az" for example,
which would be mapped into the instance variables keyword as a String with the value of "ralph",
and alphabet as a String with the value "az".public java.lang.String getAlgorithm()
getAlgorithm
in class HistoricalKey
public int findCharPosition(char ch) throws java.lang.Exception
public char getChar(int index)
public char getChar(int row, int col)
public int getRowIndex(int index)
public int getColIndex(int index)
public int getRightColIndex(int index)
public int getLeftColIndex(int index)
public int getRowBelowIndex(int index)
public int getRowAboveIndex(int index)
public void testMethods()
public void printKeySquare()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |