All Packages Class Hierarchy This Package Previous Next Index
Class javax.crypto.KeyGeneratorSpi
java.lang.Object
|
+----javax.crypto.KeyGeneratorSpi
- public abstract class KeyGeneratorSpi
- extends Object
This class provides the functionality of a (symmetric) key generator.
Key generators are constructed using the getInstance
method of the KeyGenerator class.
KeyGenerator objects are reusable, i.e., after a key has been
generated, the same KeyGenerator object can be re-used to generate further
keys.
- See Also:
- SecretKey, java.security.AlgorithmParameters, java.security.spec.AlgorithmParameterSpec
KeyGeneratorSpi()
-
engineGenerateKey()
- Generates a secret key.
engineInit(AlgorithmParameterSpec, SecureRandom)
- Initializes the key generator with the specified parameter
set and a user-provided source of randomness.
engineInit(SecureRandom)
- Initializes the key generator.
KeyGeneratorSpi
public KeyGeneratorSpi()
engineInit
protected abstract void engineInit(SecureRandom random)
- Initializes the key generator.
- Parameters:
- random - the source of randomness for this generator
engineInit
protected abstract void engineInit(AlgorithmParameterSpec params,
SecureRandom random) throws InvalidAlgorithmParameterException
- Initializes the key generator with the specified parameter
set and a user-provided source of randomness.
- Parameters:
- params - the key generation parameters
- random - the source of randomness for this key generator
- Throws:
InvalidAlgorithmParameterException
- if
params
is
inappropriate for this key generator
engineGenerateKey
protected abstract SecretKey engineGenerateKey()
- Generates a secret key.
- Returns:
- the new key
All Packages Class Hierarchy This Package Previous Next Index