hcrypto.engines
Class VigenereKey

java.lang.Object
  |
  +--hcrypto.cipher.HistoricalKey
        |
        +--hcrypto.engines.VigenereKey

public class VigenereKey
extends HistoricalKey

This class 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.
 
Fields inherited from class hcrypto.cipher.HistoricalKey
alphabet, blocksize, ciphAlphabet, cipherAlphabet, keyDescriptorPrompt, keyspec, keyword, plainAlphabet
 
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.
 
Methods inherited from class hcrypto.cipher.HistoricalKey
getAlphabet, getBlocksize, getCiphAlphabet, getCTAlphabet, getInstance, getKeyDescriptorPrompt, getKeyword, getPlainAlphabet, initAlphabets, initKey, printAlphabets, removeDuplicateChars
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DEFAULT_KEY_DESCRIPTOR_PROMPT_STRING

public static final java.lang.String DEFAULT_KEY_DESCRIPTOR_PROMPT_STRING
A keyword description.

DEFAULT_KEYWORD_STRING

public static final java.lang.String DEFAULT_KEYWORD_STRING
A default keyword.
Constructor Detail

VigenereKey

public VigenereKey()
Method Detail

init

public void init(java.lang.String keyspec)
          throws java.lang.Exception
Initializes the VigenereKey with the specified keyspec.
Overrides:
init in class HistoricalKey
Parameters:
keySpec - 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".

getAlgorithm

public java.lang.String getAlgorithm()
Returns the name of the algorithm "Vigenere".
Overrides:
getAlgorithm in class HistoricalKey