Sharkysoft home

lava.security.des
Class DesEcbCoder

java.lang.Object
  |
  +--lava.security.des.DesEcbCoder
Direct Known Subclasses:
DesEcbDecoder, DesEcbEncoder

public abstract class DesEcbCoder
extends java.lang.Object
implements ITextTransform

Encrypts/decrypts using DES in ECB mode.

Details: A DesEcbCoder performs encryption/decryption using DES in ECB (Electronic CodeBook) mode. ECB mode is the standard 64-bit block encryption/decryption mode defined in FIPS PUB 46. DES-ECB is a stateless "dictionary" cipher that converts the same input symbol to the same output symbol every time, regardless of input history. (The dictionary is selected by the key.) Because the input and output symbols are 64 bit blocks, only long arrays are supported in this class' ITextTransform interface methods.

In order to encrypt/decrypt bytes rather than longs, you must exercise one of the following options:

DesEcbCoder is the base class for DesEcbEncoder and DesEcbDecoder and contains implementations common to both classes. However, this class is abstract and cannot be instantiated because you are expected to instantiate one of the subclasses instead. DesEcbCoder is public only to make the JavaDoc documentation visible.

Since:
2001.02.02
Author:
Sharky

Method Summary
 void beginTransform()
          No operation.
 int completeTransform(java.lang.Object dest)
          No operation.
 int getTransformInputWidth()
          Returns 64.
 int getTransformOutputWidth()
          Returns 64.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

beginTransform

public final void beginTransform()
No operation.

Details: This method is defined only to satisfy an ITextTransform interface requirement and does absolutely nothing in this implementation.

Specified by:
beginTransform in interface ITextTransform

completeTransform

public final int completeTransform(java.lang.Object dest)
No operation.

Details: This method is defined only to satisfy an ITextTransform interface requirement and does absolutely nothing in this implementation.

Specified by:
completeTransform in interface ITextTransform
Parameters:
dest - ignored

getTransformInputWidth

public final int getTransformInputWidth()
Returns 64.

Details: getTransformInputWidth returns 64, indicating that only 64-bit input blocks are supported.

Specified by:
getTransformInputWidth in interface ITextTransform
Returns:
64

getTransformOutputWidth

public final int getTransformOutputWidth()
Returns 64.

Details: getTransformOutputWidth returns 64, indicating that only 64-bit output blocks are generated.

Specified by:
getTransformOutputWidth in interface ITextTransform
Returns:
64

Sharkysoft home