Sharkysoft home

lava.security.des
Class DesEcbEncoder

java.lang.Object
  |
  +--lava.security.des.DesEcbCoder
        |
        +--lava.security.des.DesEcbEncoder

public class DesEcbEncoder
extends DesEcbCoder

Encrypts using DES-ECB.

Details: DesEcbEncoder encrypts long arrays using DES (or 3DES) in ECB mode. Please refer to the superclass documentation for important information regarding usage.

Since:
2001.02.02
Author:
Sharky

Constructor Summary
DesEcbEncoder(IBlockCipher64 engine)
          Sets encryption engine.
 
Method Summary
 int continueTransform(java.lang.Object src, java.lang.Object dest, int length)
          Encrypts longs.
 
Methods inherited from class lava.security.des.DesEcbCoder
beginTransform, completeTransform, getTransformInputWidth, getTransformOutputWidth
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DesEcbEncoder

public DesEcbEncoder(IBlockCipher64 engine)
Sets encryption engine.

Details: This constructor sets the 64-bit block encryption engine (engine) used for encryption. engine can be an instance of DesEngine, TripleDesEngine, or any other 64-bit block cipher that satisfies the IBlockCipher64 interface contract.

Parameters:
engine - the engine
Method Detail

continueTransform

public int continueTransform(java.lang.Object src,
                             java.lang.Object dest,
                             int length)
Encrypts longs.

Details: continueTransform encrypts the plain text stored in src and stores the resulting cipher text in the provided output array (dest). Both arrays must be long arrays. If dest is too short to store the result, the overflow is discarded.

Parameters:
src - plain text
dest - cipher text
length - number of plain text symbols
Returns:
number of cipher text symbols stored or discarded

Sharkysoft home