|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objecthcrypto.cipher.HistoricalKey
hcrypto.engines.VigenereKey
public class VigenereKey
Represents a key for a Vigenere cipher. The key is entirely represented by a keyword String composed of characters from the chosen alphabet.
For this implementation of Vigenere cipher any of the alphabet ranges can be used.
See also:
ViegenerEngine
Alphabet
| Field Summary | |
|---|---|
static java.lang.String |
DEFAULT_KEY_DESCRIPTOR_PROMPT_STRING
A keyword description. |
static java.lang.String |
DEFAULT_KEYWORD_STRING
A default keyword. |
| Constructor Summary | |
|---|---|
VigenereKey()
|
|
| Method Summary | |
|---|---|
java.lang.String |
getAlgorithm()
Returns the name of the algorithm "Vigenere". |
void |
init(java.lang.String keyspec)
Initializes the VigenereKey with the specified keyspec. |
void |
init(java.lang.String keyword,
Alphabet alpha1,
Alphabet alpha2)
Initializes the VigenereKey given a keyword and one or more alphabets. |
| Methods inherited from class hcrypto.cipher.HistoricalKey |
|---|
getAlphabet, getBlocksize, getCipherKey, getCTAlphabet, getInstance, getKeyDescriptorPrompt, getKeyword, getPlainKey, initKey, initKey, invertKey, printAlphabets, removeDuplicateChars |
| Methods inherited from class java.lang.Object |
|---|
equals, 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 VigenereKey()
| Method Detail |
|---|
public void init(java.lang.String keyspec)
throws java.lang.Exception
init in class HistoricalKeykeySpec - takes the form "keyword/alphabet", i.e.
"76TrombonesLEDTHEBIGPARADE/azAZ09" for example,
which would be mapped into the instance variables keyword
as a String with the value of "76TrombonesLEDTHEBIGPARADE",
and alphabet as a String with the value "azAZ09".
java.lang.Exception
public void init(java.lang.String keyword,
Alphabet alpha1,
Alphabet alpha2)
throws java.lang.Exception
init in class HistoricalKeykeyword - -- a string version of the keywordalpha1, - alpha2 -- Alphabets for plain/ciphertext respectively. May
be identical.
java.lang.Exceptionpublic java.lang.String getAlgorithm()
getAlgorithm in class HistoricalKey
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||