| java.lang.Object net.sourceforge.jtds.util.DESEngine
DESEngine | public class DESEngine (Code) | | a class that provides a basic DES engine.
Modified by Matt Brinkley (mdb) ... mainly just removed depends on external classes.
version: $Id: DESEngine.java,v 1.3 2004/09/16 20:40:51 matt_brinkley Exp $ |
Field Summary | |
final protected static int | BLOCK_SIZE | static short[] | Df_Key what follows is mainly taken from "Applied Cryptography", by
Bruce Schneier, however it also bears great resemblance to Richard
Outerbridge's D3DES... | static int[] | SP1 | static int[] | SP2 | static int[] | SP3 | static int[] | SP4 | static int[] | SP5 | static int[] | SP6 | static int[] | SP7 | static int[] | SP8 | static int[] | bigbyte | static short[] | bytebit | static byte[] | pc1 | static byte[] | pc2 | static byte[] | totrot |
Constructor Summary | |
public | DESEngine() standard constructor. | public | DESEngine(boolean encrypting, byte[] key) |
Method Summary | |
protected void | desFunc(int[] wKey, byte[] in, int inOff, byte[] out, int outOff) the DES engine. | protected int[] | generateWorkingKey(boolean encrypting, byte[] key) generate an integer based working key based on our secret key
and what we processing we are planning to do. | public String | getAlgorithmName() | public int | getBlockSize() | public void | init(boolean encrypting, byte[] key) initialise a DES cipher. | public int | processBlock(byte[] in, int inOff, byte[] out, int outOff) | public void | reset() |
BLOCK_SIZE | final protected static int BLOCK_SIZE(Code) | | |
Df_Key | static short[] Df_Key(Code) | | what follows is mainly taken from "Applied Cryptography", by
Bruce Schneier, however it also bears great resemblance to Richard
Outerbridge's D3DES...
|
bigbyte | static int[] bigbyte(Code) | | |
bytebit | static short[] bytebit(Code) | | |
totrot | static byte[] totrot(Code) | | |
DESEngine | public DESEngine()(Code) | | standard constructor.
|
DESEngine | public DESEngine(boolean encrypting, byte[] key)(Code) | | mdb: convenient constructor
|
desFunc | protected void desFunc(int[] wKey, byte[] in, int inOff, byte[] out, int outOff)(Code) | | the DES engine.
|
generateWorkingKey | protected int[] generateWorkingKey(boolean encrypting, byte[] key)(Code) | | 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!).
|
getBlockSize | public int getBlockSize()(Code) | | |
init | public void init(boolean encrypting, byte[] key)(Code) | | initialise a DES cipher.
Parameters: encrypting - whether or not we are for encryption. Parameters: key - the parameters required to set up the cipher. exception: IllegalArgumentException - if the params argument isinappropriate. |
processBlock | public int processBlock(byte[] in, int inOff, byte[] out, int outOff)(Code) | | |
reset | public void reset()(Code) | | |
|
|