net.vattp.data
Class Decrypt3DES

java.lang.Object
  |
  +--net.vattp.data.MsgTransformer
        |
        +--net.vattp.data.Decrypt3DES

class Decrypt3DES
extends MsgTransformer

Implementation of triple DES-EDE decryption in Cypher Block Chaining mode.

Author:
Bill Frantz

Field Summary
private  byte[] myCurrentBlock
           
private  DES myDes1
           
private  DES myDes2
           
private  DES myDes3
           
private  byte[] myDESKeys
           
private  byte[] myIV
           
private  byte[] myPad
           
private  byte[] myPreviousBlock
           
 
Constructor Summary
(package private) Decrypt3DES(byte[] desKeys, byte[] iv)
           
 
Method Summary
private static String eightToHex(byte[] b, int offset)
           
(package private)  byte[] getSuspendInfo()
          Get any information which will be required to resume a suspended connection.
private  void increment(byte[] value)
           
(package private)  void init()
          Initiate a transformation.
(package private)  void transform(byte[] buffer)
          Transform the data.
(package private)  void transform(byte[] buffer, int off, int len)
          Transform the data.
private  void xor8(byte[] inOut, int off, byte[] in)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

myIV

private final byte[] myIV

myDESKeys

private final byte[] myDESKeys

myPreviousBlock

private final byte[] myPreviousBlock

myCurrentBlock

private byte[] myCurrentBlock

myDes1

private DES myDes1

myDes2

private DES myDes2

myDes3

private DES myDes3

myPad

private final byte[] myPad
Constructor Detail

Decrypt3DES

Decrypt3DES(byte[] desKeys,
            byte[] iv)
Method Detail

getSuspendInfo

byte[] getSuspendInfo()
Description copied from class: MsgTransformer
Get any information which will be required to resume a suspended connection.

Specified by:
getSuspendInfo in class MsgTransformer

init

void init()
Description copied from class: MsgTransformer
Initiate a transformation. This method must be called before the first transformation is called.

Specified by:
init in class MsgTransformer

transform

void transform(byte[] buffer,
               int off,
               int len)
Description copied from class: MsgTransformer
Transform the data.

Specified by:
transform in class MsgTransformer
Parameters:
buffer - is the data to be transformed.
off - is the offset in buffer to start the transformation
len - is the length to transform.

xor8

private void xor8(byte[] inOut,
                  int off,
                  byte[] in)

increment

private void increment(byte[] value)

eightToHex

private static String eightToHex(byte[] b,
                                 int offset)

transform

void transform(byte[] buffer)
Transform the data.

Parameters:
buffer - is the data to be transformed.


comments?