Package java.security
Class AlgorithmParameterGeneratorSpi
java.lang.Object
java.security.AlgorithmParameterGeneratorSpi
- Direct Known Subclasses:
AlgorithmParameterGeneratorSpi,AlgorithmParameterGeneratorSpi,BaseAlgorithmParameterGenerator
public abstract class AlgorithmParameterGeneratorSpi extends Object
AlgorithmParameterGeneratorSpi is the Service Provider Interface
(SPI) definition for AlgorithmParameterGenerator.- See Also:
AlgorithmParameterGenerator
-
Constructor Summary
Constructors Constructor Description AlgorithmParameterGeneratorSpi()Constructs a new instance ofAlgorithmParameterGeneratorSpi. -
Method Summary
Modifier and Type Method Description protected abstract AlgorithmParametersengineGenerateParameters()Computes and returnsAlgorithmParametersfor this generator's algorithm.protected abstract voidengineInit(int size, SecureRandom random)Initializes thisAlgorithmParameterGeneratorSpiwith the given size and the givenSecureRandom.protected abstract voidengineInit(AlgorithmParameterSpec genParamSpec, SecureRandom random)Initializes thisAlgorithmParameterGeneratorSpiwith the givenAlgorithmParameterSpecand the givenSecureRandom.
-
Constructor Details
-
AlgorithmParameterGeneratorSpi
public AlgorithmParameterGeneratorSpi()Constructs a new instance ofAlgorithmParameterGeneratorSpi.
-
-
Method Details
-
engineInit
Initializes thisAlgorithmParameterGeneratorSpiwith the given size and the givenSecureRandom. The default parameter set will be used.- Parameters:
size- the size (in number of bits).random- the source of randomness.
-
engineInit
protected abstract void engineInit(AlgorithmParameterSpec genParamSpec, SecureRandom random) throws InvalidAlgorithmParameterExceptionInitializes thisAlgorithmParameterGeneratorSpiwith the givenAlgorithmParameterSpecand the givenSecureRandom.- Parameters:
genParamSpec- the parameters to use.random- the source of randomness.- Throws:
InvalidAlgorithmParameterException- if the specified parameters are not supported.
-
engineGenerateParameters
Computes and returnsAlgorithmParametersfor this generator's algorithm.- Returns:
AlgorithmParametersfor this generator's algorithm.
-