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

Constructor Index

 o KeyGeneratorSpi()

Method Index

 o engineGenerateKey()
Generates a secret key.
 o engineInit(AlgorithmParameterSpec, SecureRandom)
Initializes the key generator with the specified parameter set and a user-provided source of randomness.
 o engineInit(SecureRandom)
Initializes the key generator.

Constructors

 o KeyGeneratorSpi
public KeyGeneratorSpi()

Methods

 o engineInit
protected abstract void engineInit(SecureRandom random)
Initializes the key generator.

Parameters:
random - the source of randomness for this generator
 o 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
 o engineGenerateKey
protected abstract SecretKey engineGenerateKey()
Generates a secret key.

Returns:
the new key

All Packages  Class Hierarchy  This Package  Previous  Next  Index