Package net.sourceforge.jtds.util
Class DESEngine
- java.lang.Object
-
- net.sourceforge.jtds.util.DESEngine
-
public class DESEngine extends java.lang.Object
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.6.1 2009-08-04 10:33:54 ickzon Exp $
- Author:
- Matt Brinkley
-
-
Field Summary
Fields Modifier and Type Field Description protected static int
BLOCK_SIZE
private javax.crypto.Cipher
cf
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description 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()
-
-
-
Field Detail
-
BLOCK_SIZE
protected static final int BLOCK_SIZE
- See Also:
- Constant Field Values
-
cf
private javax.crypto.Cipher cf
-
-
Method Detail
-
init
public void init(boolean encrypting, byte[] key)
initialise a DES cipher.- 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()
-
getBlockSize
public int getBlockSize()
-
processBlock
public int processBlock(byte[] in, int inOff, byte[] out, int outOff)
-
reset
public void reset()
-
-