All Packages Class Hierarchy This Package Previous Next Index
Class au.net.aba.crypto.provider.Twofish
java.lang.Object
|
+----javax.crypto.CipherSpi
|
+----au.net.aba.crypto.provider.BlockCipher
|
+----au.net.aba.crypto.provider.Twofish
- public final class Twofish
- extends BlockCipher
-
ident
-
-
MAX_KEY_BITS
-
-
ROUNDS
-
-
TF_BLOCK_SIZE
-
-
Twofish()
-
-
decryptBlock(byte[], int, int, byte[], int)
- Decrypt the given input starting at the given offset and place
the result in the provided buffer starting at the given offset.
-
encryptBlock(byte[], int, int, byte[], int)
- Encrypt the given input starting at the given offset and place
the result in the provided buffer starting at the given offset.
-
engineGetBlockSize()
- Returns the block size (in bytes).
-
engineSetPadding(String)
- Sets the padding mechanism of this cipher.
-
setKey(Key)
- Re-key the cipher.
ident
public static final String ident
ROUNDS
protected static final int ROUNDS
TF_BLOCK_SIZE
protected static final int TF_BLOCK_SIZE
MAX_KEY_BITS
public static final int MAX_KEY_BITS
Twofish
public Twofish()
setKey
protected void setKey(Key inKey) throws InvalidKeyException
- Re-key the cipher. If the provided Key is not compatible
with this cipher the exception should throw an InvalidKeyException.
- Parameters:
- inKey - the key to be used.
- Throws: InvalidKeyException
- if the key is of the wrong type.
- Overrides:
- setKey in class BlockCipher
engineSetPadding
protected void engineSetPadding(String padding) throws NoSuchPaddingException
- Sets the padding mechanism of this cipher.
- Parameters:
- padding - the name of the type of padding to be applied,
currently "PKCS7Padding", and "NoPadding" will
be accepted.
- Throws: NoSuchPaddingException
- if the padding type is unknown.
- Overrides:
- engineSetPadding in class BlockCipher
engineGetBlockSize
protected int engineGetBlockSize()
- Returns the block size (in bytes).
- Returns:
- the block size (in bytes) of the cipher.
- Overrides:
- engineGetBlockSize in class BlockCipher
encryptBlock
protected int encryptBlock(byte src[],
int srcIndex,
int len,
byte dst[],
int dstIndex) throws IllegalBlockSizeException
- Encrypt the given input starting at the given offset and place
the result in the provided buffer starting at the given offset.
The input will be an exact multiple of our blocksize.
- Overrides:
- encryptBlock in class BlockCipher
decryptBlock
protected int decryptBlock(byte src[],
int srcIndex,
int len,
byte dst[],
int dstIndex) throws BadPaddingException
- Decrypt the given input starting at the given offset and place
the result in the provided buffer starting at the given offset.
The input will be an exact multiple of our blocksize.
- Overrides:
- decryptBlock in class BlockCipher
All Packages Class Hierarchy This Package Previous Next Index