AlgorithmParameterGeneratorSpi
abstract class AlgorithmParameterGeneratorSpi
kotlin.Any | |
↳ | java.security.AlgorithmParameterGeneratorSpi |
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. However, note that defaults may vary across different providers. Additionally, the default value for a provider may change in a future version. Therefore, it is recommended to explicitly initialize the AlgorithmParameterGenerator instead of relying on provider-specific defaults.
Summary
Public constructors | |
---|---|
Protected methods | |
---|---|
abstract AlgorithmParameters! |
Generates the parameters. |
abstract Unit |
engineInit(size: Int, random: SecureRandom!) Initializes this parameter generator for a certain size and source of randomness. |
abstract Unit |
engineInit(genParamSpec: AlgorithmParameterSpec!, random: SecureRandom!) Initializes this parameter generator with a set of algorithm-specific parameter generation values. |
Public constructors
Protected methods
engineGenerateParameters
protected abstract fun engineGenerateParameters(): AlgorithmParameters!
Generates the parameters.
Return | |
---|---|
AlgorithmParameters! |
the new AlgorithmParameters object. |
engineInit
protected abstract fun engineInit(
size: Int,
random: SecureRandom!
): Unit
Initializes this parameter generator for a certain size and source of randomness.
Parameters | |
---|---|
size |
Int: the size (number of bits). |
random |
SecureRandom!: the source of randomness. |
engineInit
protected abstract fun engineInit(
genParamSpec: AlgorithmParameterSpec!,
random: SecureRandom!
): Unit
Initializes this parameter generator with a set of algorithm-specific parameter generation values.
Parameters | |
---|---|
genParamSpec |
AlgorithmParameterSpec!: the set of algorithm-specific parameter generation values. |
random |
SecureRandom!: the source of randomness. |
Exceptions | |
---|---|
java.security.InvalidAlgorithmParameterException |
if the given parameter generation values are inappropriate for this parameter generator. |