All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class au.net.aba.crypto.spec.TwofishKeySpec

java.lang.Object
   |
   +----au.net.aba.crypto.spec.TwofishKeySpec

public class TwofishKeySpec
extends Object
implements KeySpec
A class that provides a specification for a Twofish key. Twofish keys may be 256, 192 or 128 bits long (shorter keys are padded with zeros to next larger size).


Variable Index

 o ident

Constructor Index

 o TwofishKeySpec(byte[])
Uses the first 32 bytes (if available) as the key, starting at 0
 o TwofishKeySpec(byte[], int)
Uses the first 32 bytes (if available) in key, beginning at offset, as the Twofish key

Method Index

 o getKey()
Returns the Twofish key.

Variables

 o ident
 public static final String ident

Constructors

 o TwofishKeySpec
 public TwofishKeySpec(byte key[]) throws InvalidKeyException
Uses the first 32 bytes (if available) as the key, starting at 0

Parameters:
key - the byte array to use as key material.
Throws: InvalidKeyException
if the key material is too short.
 o TwofishKeySpec
 public TwofishKeySpec(byte key[],
                       int offset) throws InvalidKeyException
Uses the first 32 bytes (if available) in key, beginning at offset, as the Twofish key

Parameters:
key - the byte array to use as key material.
offset - the offset to start at.
Throws: InvalidKeyException
if the key material is too short.

Methods

 o getKey
 public byte[] getKey()
Returns the Twofish key.

Returns:
the bytes making up the key.

All Packages  Class Hierarchy  This Package  Previous  Next  Index