java.lang.Object
java.security.AlgorithmParameterGeneratorSpi
com.ibm.crypto.hdwrCCA.provider.ECParameterGenerator
This class can be used to generate a set of Elliptic Curve parameters to
be used with the Elliptic Curve algorithm. In cases where this class has not
been explicitly initialized, parameters for the default NIST curve named
secp256r1 will be generated.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected AlgorithmParameters
Generates Elliptic Curve parameters.protected void
engineInit
(int size, SecureRandom random) Initializes this parameter generator for a certain key size and source of randomness.protected void
engineInit
(AlgorithmParameterSpec genParamSpec, SecureRandom random) Initializes this parameter generator with a set of algorithm-specific parameter generation values and a source of randomness.
-
Constructor Details
-
ECParameterGenerator
public ECParameterGenerator()Constructor
-
-
Method Details
-
engineInit
Initializes this parameter generator for a certain key size and source of randomness. The source of randomness will be ignored because only standard Elliptic Curve parameters will be generated for the supplied key size.- Specified by:
engineInit
in classAlgorithmParameterGeneratorSpi
- Parameters:
size
- the key size in number of bitsrandom
- the source of randomness, which is ignored- Throws:
InvalidParameterException
- if the key size is not supported
-
engineInit
protected void engineInit(AlgorithmParameterSpec genParamSpec, SecureRandom random) throws InvalidAlgorithmParameterException Initializes this parameter generator with a set of algorithm-specific parameter generation values and a source of randomness. The source of randomness will be ignored because only standard Elliptic Curve parameters will be generated.- Specified by:
engineInit
in classAlgorithmParameterGeneratorSpi
- Parameters:
genParamSpec
- the set of algorithm-specific parameter generation valuesrandom
- the source of randomness, which will be ignored- Throws:
NullPointerException
- ifgenParamSpec
is nullInvalidAlgorithmParameterException
- if the given parameter generation values are inappropriate for this parameter generator
-
engineGenerateParameters
Generates Elliptic Curve parameters. If this class has not been explicitly initialized, parameters for the default NIST curve named secp256r1 will be generated.- Specified by:
engineGenerateParameters
in classAlgorithmParameterGeneratorSpi
- Returns:
- the generated Elliptic Curve parameters
-