java.security
Class AlgorithmParameterGeneratorSpi

java.lang.Object sample code for java.lang.Object definition code for java.lang.Object 
  extended by java.security.AlgorithmParameterGeneratorSpi

public abstract class AlgorithmParameterGeneratorSpi
extends Object sample code for java.lang.Object definition code for java.lang.Object

This class defines the Service Provider Interface (SPI) for the AlgorithmParameterGenerator class, which is used to generate a set of parameters to be used with a certain algorithm.

All the abstract methods in this class must be implemented by each cryptographic service provider who wishes to supply the implementation of a parameter generator for a particular algorithm.

In case the client does not explicitly initialize the AlgorithmParameterGenerator (via a call to an engineInit method), each provider must supply (and document) a default initialization. For example, the Sun provider uses a default modulus prime size of 1024 bits for the generation of DSA parameters.

Since:
1.2
See Also:
AlgorithmParameterGenerator sample code for java.security.AlgorithmParameterGenerator definition code for java.security.AlgorithmParameterGenerator , AlgorithmParameters sample code for java.security.AlgorithmParameters definition code for java.security.AlgorithmParameters , AlgorithmParameterSpec sample code for java.security.spec.AlgorithmParameterSpec definition code for java.security.spec.AlgorithmParameterSpec

Constructor Summary
AlgorithmParameterGeneratorSpi sample code for java.security.AlgorithmParameterGeneratorSpi.AlgorithmParameterGeneratorSpi() definition code for java.security.AlgorithmParameterGeneratorSpi.AlgorithmParameterGeneratorSpi() ()
           
 
Method Summary
protected abstract  AlgorithmParameters sample code for java.security.AlgorithmParameters definition code for java.security.AlgorithmParameters engineGenerateParameters sample code for java.security.AlgorithmParameterGeneratorSpi.engineGenerateParameters() definition code for java.security.AlgorithmParameterGeneratorSpi.engineGenerateParameters() ()
          Generates the parameters.
protected abstract  void engineInit sample code for java.security.AlgorithmParameterGeneratorSpi.engineInit(java.security.spec.AlgorithmParameterSpec, java.security.SecureRandom) definition code for java.security.AlgorithmParameterGeneratorSpi.engineInit(java.security.spec.AlgorithmParameterSpec, java.security.SecureRandom) (AlgorithmParameterSpec sample code for java.security.spec.AlgorithmParameterSpec definition code for java.security.spec.AlgorithmParameterSpec  genParamSpec, SecureRandom sample code for java.security.SecureRandom definition code for java.security.SecureRandom  random)
          Initializes this parameter generator with a set of algorithm-specific parameter generation values.
protected abstract  void engineInit sample code for java.security.AlgorithmParameterGeneratorSpi.engineInit(int, java.security.SecureRandom) definition code for java.security.AlgorithmParameterGeneratorSpi.engineInit(int, java.security.SecureRandom) (int size, SecureRandom sample code for java.security.SecureRandom definition code for java.security.SecureRandom  random)
          Initializes this parameter generator for a certain size and source of randomness.
 
Methods inherited from class java.lang.Object sample code for java.lang.Object definition code for java.lang.Object
clone sample code for java.lang.Object.clone() definition code for java.lang.Object.clone() , equals sample code for java.lang.Object.equals(java.lang.Object) definition code for java.lang.Object.equals(java.lang.Object) , finalize sample code for java.lang.Object.finalize() definition code for java.lang.Object.finalize() , getClass sample code for java.lang.Object.getClass() definition code for java.lang.Object.getClass() , hashCode sample code for java.lang.Object.hashCode() definition code for java.lang.Object.hashCode() , notify sample code for java.lang.Object.notify() definition code for java.lang.Object.notify() , notifyAll sample code for java.lang.Object.notifyAll() definition code for java.lang.Object.notifyAll() , toString sample code for java.lang.Object.toString() definition code for java.lang.Object.toString() , wait sample code for java.lang.Object.wait() definition code for java.lang.Object.wait() , wait sample code for java.lang.Object.wait(long) definition code for java.lang.Object.wait(long) , wait sample code for java.lang.Object.wait(long, int) definition code for java.lang.Object.wait(long, int)
 

Constructor Detail

AlgorithmParameterGeneratorSpi sample code for java.security.AlgorithmParameterGeneratorSpi() definition code for java.security.AlgorithmParameterGeneratorSpi()

public AlgorithmParameterGeneratorSpi()
Method Detail

engineInit sample code for java.security.AlgorithmParameterGeneratorSpi.engineInit(int, java.security.SecureRandom) definition code for java.security.AlgorithmParameterGeneratorSpi.engineInit(int, java.security.SecureRandom)

protected abstract void engineInit(int size,
                                   SecureRandom sample code for java.security.SecureRandom definition code for java.security.SecureRandom  random)
Initializes this parameter generator for a certain size and source of randomness.

Parameters:
size - the size (number of bits).
random - the source of randomness.

engineInit sample code for java.security.AlgorithmParameterGeneratorSpi.engineInit(java.security.spec.AlgorithmParameterSpec, java.security.SecureRandom) definition code for java.security.AlgorithmParameterGeneratorSpi.engineInit(java.security.spec.AlgorithmParameterSpec, java.security.SecureRandom)

protected abstract void engineInit(AlgorithmParameterSpec sample code for java.security.spec.AlgorithmParameterSpec definition code for java.security.spec.AlgorithmParameterSpec  genParamSpec,
                                   SecureRandom sample code for java.security.SecureRandom definition code for java.security.SecureRandom  random)
                            throws InvalidAlgorithmParameterException sample code for java.security.InvalidAlgorithmParameterException definition code for java.security.InvalidAlgorithmParameterException 
Initializes this parameter generator with a set of algorithm-specific parameter generation values.

Parameters:
genParamSpec - the set of algorithm-specific parameter generation values.
random - the source of randomness.
Throws:
InvalidAlgorithmParameterException sample code for java.security.InvalidAlgorithmParameterException definition code for java.security.InvalidAlgorithmParameterException - if the given parameter generation values are inappropriate for this parameter generator.

engineGenerateParameters sample code for java.security.AlgorithmParameterGeneratorSpi.engineGenerateParameters() definition code for java.security.AlgorithmParameterGeneratorSpi.engineGenerateParameters()

protected abstract AlgorithmParameters sample code for java.security.AlgorithmParameters definition code for java.security.AlgorithmParameters  engineGenerateParameters()
Generates the parameters.

Returns:
the new AlgorithmParameters object.