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).
-
ident
-
-
TwofishKeySpec(byte[])
- Uses the first 32 bytes (if available) as the key, starting at 0
-
TwofishKeySpec(byte[], int)
- Uses the first 32 bytes (if available) in key, beginning at offset,
as the Twofish key
-
getKey()
- Returns the Twofish key.
ident
public static final String ident
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.
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.
getKey
public byte[] getKey()
- Returns the Twofish key.
- Returns:
- the bytes making up the key.
All Packages Class Hierarchy This Package Previous Next Index