cryptix.provider.cipher
public class DES2X extends Cipher implements SymmetricCipher
The encoded form of the DESX key should be a 32-byte array, consisting of one 8-byte DES key K and three XOR keys K1, K2 and K3 in order - K, K1, K2 and K3. Encryption and decryption are done as follows:
When DES2X is used with the CBC mode class (algorithm name "DES2X/CBC"), the result is Outer-CBC, and only one IV is used.
References:
Copyright © 1998
Systemics Ltd on behalf of the
Cryptix Development Team.
All rights reserved.
$Revision: 1.3 $
Since: Cryptix 3.0.4
Constructor Summary | |
---|---|
DES2X()
Constructs a DES2X cipher object, in the UNINITIALIZED state.
|
Method Summary | |
---|---|
int | engineBlockSize()
SPI: Returns the length of an input block, in bytes.
|
protected void | engineInitDecrypt(Key key)
SPI: Initializes this cipher for decryption, using the
specified key.
|
void | engineInitEncrypt(Key key)
SPI: Initializes this cipher for encryption, using the
specified key.
|
protected int | engineUpdate(byte[] in, int inOffset, int inLen, byte[] out, int outOffset)
SPI: This is the main engine method for updating data.
|
Returns: the length in bytes of an input block for this cipher.
Parameters: key the key to use for decryption.
Throws: KeyException if one of the following occurs:
Parameters: key the key to use for encryption.
Throws: KeyException if one of the following occurs:
in and out may be the same array, and the input and output regions may overlap.
Parameters: in the input data. inOffset the offset into in specifying where the data starts. inLen the length of the subarray. out the output array. outOffset the offset indicating where to start writing into the out array.
Returns: the number of bytes written.
Throws: CryptixException if the native library is being used, and it reports an error.