java.security
Class AlgorithmParameterGeneratorSpi

java.lang.Object
  extended by java.security.AlgorithmParameterGeneratorSpi

public abstract class AlgorithmParameterGeneratorSpi
extends Object

AlgorithmParameterGeneratorSpi is the Service Provider Interface for the AlgorithmParameterGenerator class. This class is used to generate the algorithm parameters for a specific algorithm.

Since:
JDK 1.2

Constructor Summary
AlgorithmParameterGeneratorSpi()
          Constructs a new AlgorithmParameterGeneratorSpi
 
Method Summary
protected abstract  AlgorithmParameters engineGenerateParameters()
          Generate a new set of AlgorithmParameters.
protected abstract  void engineInit(AlgorithmParameterSpec genParamSpec, SecureRandom random)
          Initializes the parameter generator with the specified AlgorithmParameterSpec and SecureRandom classes.
protected abstract  void engineInit(int size, SecureRandom random)
          Initializes the parameter generator with the specified size and SecureRandom
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AlgorithmParameterGeneratorSpi

public AlgorithmParameterGeneratorSpi()
Constructs a new AlgorithmParameterGeneratorSpi

Method Detail

engineInit

protected abstract void engineInit(int size,
                                   SecureRandom random)
Initializes the parameter generator with the specified size and SecureRandom

Parameters:
size - the size( in number of bits)
random - the SecureRandom class to use for randomness

engineInit

protected abstract void engineInit(AlgorithmParameterSpec genParamSpec,
                                   SecureRandom random)
                            throws InvalidAlgorithmParameterException
Initializes the parameter generator with the specified AlgorithmParameterSpec and SecureRandom classes. If genParamSpec is an invalid AlgorithmParameterSpec for this AlgorithmParameterGeneratorSpi then it throws InvalidAlgorithmParameterException

Parameters:
genParamSpec - the AlgorithmParameterSpec class to use
random - the SecureRandom class to use for randomness
Throws:
InvalidAlgorithmParameterException - genParamSpec is invalid

engineGenerateParameters

protected abstract AlgorithmParameters engineGenerateParameters()
Generate a new set of AlgorithmParameters.