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

Variable Index

 o ident
 o MAX_KEY_BITS
 o ROUNDS
 o TF_BLOCK_SIZE

Constructor Index

 o Twofish()

Method Index

 o 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.
 o 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.
 o engineGetBlockSize()
Returns the block size (in bytes).
 o engineSetPadding(String)
Sets the padding mechanism of this cipher.
 o setKey(Key)
Re-key the cipher.

Variables

 o ident
 public static final String ident
 o ROUNDS
 protected static final int ROUNDS
 o TF_BLOCK_SIZE
 protected static final int TF_BLOCK_SIZE
 o MAX_KEY_BITS
 public static final int MAX_KEY_BITS

Constructors

 o Twofish
 public Twofish()

Methods

 o 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
 o 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
 o engineGetBlockSize
 protected int engineGetBlockSize()
Returns the block size (in bytes).

Returns:
the block size (in bytes) of the cipher.
Overrides:
engineGetBlockSize in class BlockCipher
 o 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
 o 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