All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class au.net.aba.crypto.provider.DES

java.lang.Object
   |
   +----javax.crypto.CipherSpi
           |
           +----au.net.aba.crypto.provider.BlockCipher
                   |
                   +----au.net.aba.crypto.provider.DES

public class DES
extends BlockCipher
A class that provides DES encryption.


Variable Index

 o ident
 o Kn1
 o work

Constructor Index

 o DES()

Method Index

 o decryptBlock(byte[], int, int, byte[], int)
Decrypt the given block starting at the given offset and place the result in the provided buffer starting at the given offset.
 o desfunc(int[], int[])
the DES engine.
 o encryptBlock(byte[], int, int, byte[], int)
Encrypt the given block starting at the given offset and place the result in the provided buffer starting at the given offset.
 o prepareKeys(int, byte[], int[])
prepare the key for whatever processing we are planing.
 o scrunch(byte[], int, int[])
pack 8 bytes from outof into 2 ints.
 o setKey(Key)
Re-key the cipher.
 o unscrunch(int[], byte[], int)
extract 8 bytes from the 2 ints in outof.

Variables

 o ident
 public static final String ident
 o work
 protected int work[]
 o Kn1
 protected int Kn1[]

Constructors

 o DES
 public DES()

Methods

 o setKey
 protected void setKey(Key key) throws InvalidKeyException
Re-key the cipher.

Overrides:
setKey in class BlockCipher
 o encryptBlock
 protected int encryptBlock(byte in[],
                            int inOff,
                            int len,
                            byte out[],
                            int outOff) throws IllegalBlockSizeException
Encrypt the given block starting at the given offset and place the result in the provided buffer starting at the given offset.

Overrides:
encryptBlock in class BlockCipher
 o decryptBlock
 protected int decryptBlock(byte in[],
                            int inOff,
                            int len,
                            byte out[],
                            int outOff) throws BadPaddingException
Decrypt the given block starting at the given offset and place the result in the provided buffer starting at the given offset.

Overrides:
decryptBlock in class BlockCipher
 o prepareKeys
 protected void prepareKeys(int opMode,
                            byte key[],
                            int keys[])
prepare the key for whatever processing we are planing. Acknowledgements for this routine go to James Gillogly & Phil Karn. (whoever, and wherever they are!).

 o scrunch
 protected void scrunch(byte outof[],
                        int offset,
                        int into[])
pack 8 bytes from outof into 2 ints.

 o unscrunch
 protected void unscrunch(int outof[],
                          byte into[],
                          int offset)
extract 8 bytes from the 2 ints in outof.

 o desfunc
 protected synchronized void desfunc(int block[],
                                     int keys[])
the DES engine.


All Packages  Class Hierarchy  This Package  Previous  Next  Index