au.net.aba.crypto.spec
Class BlowfishKeySpec

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

public class BlowfishKeySpec
extends java.lang.Object
implements java.security.spec.KeySpec

A class that provides a specification for a Blowfish key.


Field Summary
static java.lang.String ident
           
 
Constructor Summary
BlowfishKeySpec(byte[] key)
          Uses the first 56 bytes (if available) as the key, starting at 0
BlowfishKeySpec(byte[] key, int offset)
          Uses the first 56 bytes (if available) in key, beginning at offset, as the Blowfish key
 
Method Summary
 byte[] getKey()
          Returns the Blowfish key.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ident

public static final java.lang.String ident
Constructor Detail

BlowfishKeySpec

public BlowfishKeySpec(byte[] key)
                throws java.security.InvalidKeyException
Uses the first 56 bytes (if available) as the key, starting at 0
Parameters:
key - the byte array to use as key material.
Throws:
java.security.InvalidKeyException - if the key material is too short.

BlowfishKeySpec

public BlowfishKeySpec(byte[] key,
                       int offset)
                throws java.security.InvalidKeyException
Uses the first 56 bytes (if available) in key, beginning at offset, as the Blowfish key
Parameters:
key - the byte array to use as key material.
offset - the offset to start at.
Throws:
java.security.InvalidKeyException - if the key material is too short.
Method Detail

getKey

public byte[] getKey()
Returns the Blowfish key.
Returns:
the bytes making up the key.