iaik.security.cipher
Class IDEAKeyGenerator
java.lang.Object
|
+--javax.crypto.KeyGeneratorSpi
|
+--iaik.security.cipher.IDEAKeyGenerator
- public class IDEAKeyGenerator
- extends KeyGeneratorSpi
This class provides the functionality of a IDEA key generator.
A key generator is used for creating secret keys for symmetric algorithms.
An application uses
KeyGenerator idea_key_gen = KeyGenerator.getInstance("IDEA");
for creating a KeyGenerator object for the IDEA algorithm. For actually generating
the requestedsecret IDEA key from the KeyGenerator object just created,
an application calls the generateKey method after having initialized
the generator with some random seed or relied on the default system-provided
source of randomness:
SecretKey idea_key = idea_key_gen.generateKey();
- See Also:
KeyGenerator,
KeyGeneratorSpi,
SecretKey,
SecretKey,
IDEA
| Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
IDEAKeyGenerator
public IDEAKeyGenerator()
engineInit
public void engineInit(AlgorithmParameterSpec params,
SecureRandom random)
throws InvalidAlgorithmParameterException
- Because this IDEA key generator needs no parameter this initialization method
only throws a InvalidAlgorithmParameterException.
- Overrides:
- engineInit in class KeyGeneratorSpi
- Throws:
- InvalidAlgorithmParameterException - since this IDEA key generator needs no parameters
engineInit
public void engineInit(SecureRandom random)
- Initializes this IDEA key generator with the given random seed.
- Overrides:
- engineInit in class KeyGeneratorSpi
- Parameters:
random - the random seed for this generator
engineInit
public void engineInit(int strength,
SecureRandom random)
- Initializes this IDEA key generator for the given strength with the given random seed.
Since an IDEA key has a defined length of 128 bits,
the given strength value would be ignored.
- Overrides:
- engineInit in class KeyGeneratorSpi
- Parameters:
strength - the strength of the key to be created; ignoredrandom - the random seed
engineGenerateKey
public SecretKey engineGenerateKey()
- Generates an IDEA key.
- Overrides:
- engineGenerateKey in class KeyGeneratorSpi
- Returns:
- the new created IDEA key
- See Also:
SecretKey