ch.ethz.ssh2.crypto.cipher
Class DES
java.lang.Object
ch.ethz.ssh2.crypto.cipher.DES
- BlockCipher
public class DES
extends java.lang.Object
DES.
DES() - standard constructor.
|
protected void | desFunc(int[] wKey, byte[] in, int inOff, byte[] out, int outOff) - the DES engine.
|
protected int[] | generateWorkingKey(boolean encrypting, byte[] key, int off) - generate an integer based working key based on our secret key and what we
processing we are planning to do.
|
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)
|
DES
public DES()
standard constructor.
desFunc
protected void desFunc(int[] wKey,
byte[] in,
int inOff,
byte[] out,
int outOff)
the DES engine.
generateWorkingKey
protected int[] generateWorkingKey(boolean encrypting,
byte[] key,
int off)
generate an integer based working key based on our secret key and what we
processing we are planning to do.
Acknowledgements for this routine go to James Gillogly & Phil Karn.
(whoever, and wherever they are!).
getAlgorithmName
public String getAlgorithmName()
init
public void init(boolean encrypting,
byte[] key)
initialise a DES cipher.
- init in interface BlockCipher
encrypting
- whether or not we are for encryption.key
- the parameters required to set up the cipher.
transformBlock
public void transformBlock(byte[] in,
int inOff,
byte[] out,
int outOff)
- transformBlock in interface BlockCipher