hcrypto.engines
Class RailfenceEngine

java.lang.Object
  extended by hcrypto.cipher.CipherEngine
      extended by hcrypto.cipher.BlockCipher
          extended by hcrypto.engines.RailfenceEngine

public class RailfenceEngine
extends BlockCipher

Implements the Historical Railfence cipher.


Constructor Summary
RailfenceEngine()
          Creates a RailFenceEngine and sets the alphabetRangeOptions instance variable to "111111", which translates to all six alphabet options for both the plaintext and ciphertext alphabets.
 
Method Summary
 java.lang.String engineDecode(java.lang.String cText)
          engineDecode()
 java.lang.String engineEncode(java.lang.String str)
          This abstract method must be implemented in the subclass to perform basic encrypting step for a given cipher algorithm.
 
Methods inherited from class hcrypto.cipher.CipherEngine
getAlphabetRangeOptions
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RailfenceEngine

public RailfenceEngine()
Creates a RailFenceEngine and sets the alphabetRangeOptions instance variable to "111111", which translates to all six alphabet options for both the plaintext and ciphertext alphabets.

Method Detail

engineEncode

public java.lang.String engineEncode(java.lang.String str)
                              throws java.lang.Exception
Description copied from class: BlockCipher
This abstract method must be implemented in the subclass to perform basic encrypting step for a given cipher algorithm.

Throws:
java.lang.Exception

engineDecode

public java.lang.String engineDecode(java.lang.String cText)
engineDecode()

Parameters:
cText - is the entire cryptotext, which is assumed in this implementation to be some number of evenly-sized blocks of length blocksize