All Packages Class Hierarchy This Package Previous Next Index
Class au.net.aba.crypto.provider.BlowfishKeyGenerator
java.lang.Object
|
+----javax.crypto.KeyGeneratorSpi
|
+----au.net.aba.crypto.provider.BlowfishKeyGenerator
- public class BlowfishKeyGenerator
- extends KeyGeneratorSpi
This class is used for generating random Blowfish keys. This class
should not be instantiated directly, instead use the
javax.crypto.KeyGenerator interface.
There is no AlgorithmParameterSpec class defined for Blowfish so this
generator can only be initialised using the keysize,random
initialisation.
The default keysize is 192 bits and can be any multiple of 8 up to
448 bits.
-
ident
-
-
BlowfishKeyGenerator()
-
-
engineGenerateKey()
- Generates a random secret key of the currently configured
keysize and using the configured random source.
-
engineInit(AlgorithmParameterSpec, SecureRandom)
- This method is not implemented as there is no AlgorithmParameterSpec
defined for Blowfish.
-
engineInit(int, SecureRandom)
- Initialises this key generator for a certain strength, using the
given source of randomness.
-
engineInit(SecureRandom)
- Initialises the key generator with the given random number source.
ident
public static final String ident
BlowfishKeyGenerator
public BlowfishKeyGenerator()
engineInit
protected void engineInit(AlgorithmParameterSpec params,
SecureRandom random) throws InvalidAlgorithmParameterException
- This method is not implemented as there is no AlgorithmParameterSpec
defined for Blowfish. (Use one of the other initialisation methods!)
- Parameters:
- params - The algorithm parameter specs for this
generator.
- random - A source of random numbers for this generator.
- Throws: InvalidAlgorithmParameterException
- An invalid
parameter specification is provided.
- Overrides:
- engineInit in class KeyGeneratorSpi
engineInit
protected void engineInit(int strength,
SecureRandom random)
- Initialises this key generator for a certain strength, using the
given source of randomness.
- Parameters:
- strength - the strength of the key. This is an
algorithm-specific metric specified in number of bits.
- random - the source of randomness for this key generator
- Overrides:
- engineInit in class KeyGeneratorSpi
engineInit
protected void engineInit(SecureRandom random)
- Initialises the key generator with the given random number source.
- Parameters:
- random - a source of random numbers for this generator.
- Overrides:
- engineInit in class KeyGeneratorSpi
engineGenerateKey
protected SecretKey engineGenerateKey()
- Generates a random secret key of the currently configured
keysize and using the configured random source.
- Returns:
- a secret key representing a Blowfish key.
- Overrides:
- engineGenerateKey in class KeyGeneratorSpi
All Packages Class Hierarchy This Package Previous Next Index