ch.ethz.ssh2.crypto.cipher
Class DESede

java.lang.Object
  extended bych.ethz.ssh2.crypto.cipher.DES
      extended bych.ethz.ssh2.crypto.cipher.DESede
All Implemented Interfaces:
BlockCipher

public class DESede
extends DES

DESede.

Version:
$Id: DESede.java,v 1.3 2005/08/11 12:47:27 cplattne Exp $ethz.ch
Author:
See comments in the source file

Field Summary
private  boolean encrypt
           
private  int[] key1
           
private  int[] key2
           
private  int[] key3
           
 
Fields inherited from class ch.ethz.ssh2.crypto.cipher.DES
bigbyte, bytebit, Df_Key, pc1, pc2, SP1, SP2, SP3, SP4, SP5, SP6, SP7, SP8, totrot
 
Constructor Summary
DESede()
          standard constructor.
 
Method Summary
 java.lang.String getAlgorithmName()
           
 int getBlockSize()
           
 void init(boolean encrypting, byte[] key)
          initialise a DES cipher.
 void reset()
           
 void transformBlock(byte[] in, int inOff, byte[] out, int outOff)
           
 
Methods inherited from class ch.ethz.ssh2.crypto.cipher.DES
desFunc, generateWorkingKey
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

key1

private int[] key1

key2

private int[] key2

key3

private int[] key3

encrypt

private boolean encrypt
Constructor Detail

DESede

public DESede()
standard constructor.

Method Detail

init

public void init(boolean encrypting,
                 byte[] key)
initialise a DES cipher.

Specified by:
init in interface BlockCipher
Overrides:
init in class DES
Parameters:
encrypting - whether or not we are for encryption.
key - the parameters required to set up the cipher.
Throws:
java.lang.IllegalArgumentException - if the params argument is inappropriate.

getAlgorithmName

public java.lang.String getAlgorithmName()
Overrides:
getAlgorithmName in class DES

getBlockSize

public int getBlockSize()
Specified by:
getBlockSize in interface BlockCipher
Overrides:
getBlockSize in class DES

transformBlock

public void transformBlock(byte[] in,
                           int inOff,
                           byte[] out,
                           int outOff)
Specified by:
transformBlock in interface BlockCipher
Overrides:
transformBlock in class DES

reset

public void reset()
Overrides:
reset in class DES