| 
 | |||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectnet.sourceforge.jtds.util.DESEngine
a class that provides a basic DES engine. Modified by Matt Brinkley (mdb) ... mainly just removed depends on external classes.
| Field Summary | |
| (package private) static int[] | bigbyte | 
| protected static int | BLOCK_SIZE | 
| (package private) static short[] | bytebit | 
| (package private) static short[] | Df_Keywhat follows is mainly taken from "Applied Cryptography", by Bruce Schneier, however it also bears great resemblance to Richard Outerbridge's D3DES... | 
| (package private) static byte[] | pc1 | 
| (package private) static byte[] | pc2 | 
| (package private) static int[] | SP1 | 
| (package private) static int[] | SP2 | 
| (package private) static int[] | SP3 | 
| (package private) static int[] | SP4 | 
| (package private) static int[] | SP5 | 
| (package private) static int[] | SP6 | 
| (package private) static int[] | SP7 | 
| (package private) static int[] | SP8 | 
| (package private) static byte[] | totrot | 
| private  int[] | workingKey | 
| Constructor Summary | |
| DESEngine()standard constructor. | |
| DESEngine(boolean encrypting,
          byte[] key)mdb: convenient constructor | |
| 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. | 
|  java.lang.String | getAlgorithmName() | 
|  int | getBlockSize() | 
|  void | init(boolean encrypting,
     byte[] key)initialise a DES cipher. | 
|  int | processBlock(byte[] in,
             int inOff,
             byte[] out,
             int outOff) | 
|  void | reset() | 
| Methods inherited from class java.lang.Object | 
| clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait | 
| Field Detail | 
protected static final int BLOCK_SIZE
private int[] workingKey
static short[] Df_Key
static short[] bytebit
static int[] bigbyte
static byte[] pc1
static byte[] totrot
static byte[] pc2
static int[] SP1
static int[] SP2
static int[] SP3
static int[] SP4
static int[] SP5
static int[] SP6
static int[] SP7
static int[] SP8
| Constructor Detail | 
public DESEngine()
public DESEngine(boolean encrypting,
                 byte[] key)
| Method Detail | 
public void init(boolean encrypting,
                 byte[] key)
encrypting - whether or not we are for encryption.key - the parameters required to set up the cipher.
java.lang.IllegalArgumentException - if the params argument is
 inappropriate.public java.lang.String getAlgorithmName()
public int getBlockSize()
public int processBlock(byte[] in,
                        int inOff,
                        byte[] out,
                        int outOff)
public void reset()
protected int[] generateWorkingKey(boolean encrypting,
                                   byte[] key)
protected void desFunc(int[] wKey,
                       byte[] in,
                       int inOff,
                       byte[] out,
                       int outOff)
| 
 | |||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||