Sharkysoft home

lava.security.des
Class DesOfbCoder

java.lang.Object
  |
  +--lava.security.des.DesFbCoder
        |
        +--lava.security.des.DesOfbCoder

public class DesOfbCoder
extends DesFbCoder

Encrypts data using DES in cipher feedback (CFB) mode.

Details: DesOfbCoder performs data encryption/decryption using DES in output feedback (CFB) mode. This class performs both encryption and decryption, because the two operations are identical and self-canceling. This special mode of DES is described in FIPS PUB 81. Refer to the superclass documentation and for details.

Since:
1999.08.23
Author:
Sharky

Constructor Summary
DesOfbCoder(DesKey key, int k, long iv)
          Initializes with DES function, value for k, and initialization vector.
DesOfbCoder(IBlockCipher64 engine, int k, long iv)
          Initializes with arbitrary block cipher, value for k, and initialization vector.
 
Method Summary
 int continueTransform(java.lang.Object input, java.lang.Object output, int len)
          ITextTransform interface method.
 
Methods inherited from class lava.security.des.DesFbCoder
beginTransform, completeTransform, getTransformInputWidth, getTransformOutputWidth
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DesOfbCoder

public DesOfbCoder(IBlockCipher64 engine,
                   int k,
                   long iv)
Initializes with arbitrary block cipher, value for k, and initialization vector.

Details: This constructor initializes a new instance to encrypt/decrypt k-bit symbols using the given 64-bit block cipher and initialization vector (IV).

Parameters:
engine - the block cipher
k - the symbol width
iv - the initialization vector

DesOfbCoder

public DesOfbCoder(DesKey key,
                   int k,
                   long iv)
Initializes with DES function, value for k, and initialization vector.

Details: This constructor initializes a new instance to encrypt/decrypt k-bit symbols using the DES encryption function corresponding to the given key and initialization vector (IV).

Parameters:
engine - the block cipher
k - the symbol width
iv - the initialization vector
Method Detail

continueTransform

public int continueTransform(java.lang.Object input,
                             java.lang.Object output,
                             int len)
ITextTransform interface method.

Details: Refer to ITextTransform for a description of this interface method's contract.

This implementation performs both encryption and decryption, immediately producing one output symbol for each input symbol.

Parameters:
input - the input symbols
output - buffer for output symbols
len - number of input symbols to process
Returns:
number of output symbols written to output

Sharkysoft home