au.net.aba.crypto.provider
Class IDEAKeyGenerator
java.lang.Object
|
+--javax.crypto.KeyGeneratorSpi
|
+--au.net.aba.crypto.provider.IDEAKeyGenerator
- public class IDEAKeyGenerator
- extends KeyGeneratorSpi
This class is used for generating random IDEA keys. This class
should not be instantiated directly, instead use the
javax.crypto.KeyGenerator interface.
There is no AlgorithmParameterSpec class defined for IDEA so this
generator can only be initialised using the keysize,random
initialisation.
The keysize is 128 bits.
Field Summary |
static java.lang.String |
ident
|
Method Summary |
protected SecretKey |
engineGenerateKey()
Generates a secret key. |
protected void |
engineInit(java.security.spec.AlgorithmParameterSpec params,
java.security.SecureRandom random)
This method is not implemented as there is no AlgorithmParameterSpec
defined for IDEA. |
protected void |
engineInit(int strength,
java.security.SecureRandom random)
Since IDEA keys are of a fixed size, this method does
nothing except set the random source. |
protected void |
engineInit(java.security.SecureRandom random)
Initialises the key generator with the given random source. |
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
ident
public static final java.lang.String ident
IDEAKeyGenerator
public IDEAKeyGenerator()
engineInit
protected void engineInit(java.security.spec.AlgorithmParameterSpec params,
java.security.SecureRandom random)
throws java.security.InvalidAlgorithmParameterException
- This method is not implemented as there is no AlgorithmParameterSpec
defined for IDEA. (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:
- java.security.InvalidAlgorithmParameterException - An invalid
parameter specification is provided.
- Overrides:
- engineInit in class KeyGeneratorSpi
engineInit
protected void engineInit(int strength,
java.security.SecureRandom random)
- Since IDEA keys are of a fixed size, this method does
nothing except set the random source.
- Parameters:
strength
- the strength of the key. This parameter is
ignored.random
- the source of randomness for this key generator- Overrides:
- engineInit in class KeyGeneratorSpi
engineInit
protected void engineInit(java.security.SecureRandom random)
- Initialises the key generator with the given random source.
- Parameters:
random
- a source of random numbers for this generator.- Overrides:
- engineInit in class KeyGeneratorSpi
engineGenerateKey
protected SecretKey engineGenerateKey()
- Generates a secret key.
- Returns:
- a secret key representing a DES key.
- Overrides:
- engineGenerateKey in class KeyGeneratorSpi