public static class KeyPairGeneratorSpi.EC extends KeyPairGeneratorSpi
KeyPairGeneratorSpi.EC, KeyPairGeneratorSpi.ECDH, KeyPairGeneratorSpi.ECDHC, KeyPairGeneratorSpi.ECDSA, KeyPairGeneratorSpi.ECMQV| Constructor and Description |
|---|
EC() |
EC(String algorithm,
ProviderConfiguration configuration) |
| Modifier and Type | Method and Description |
|---|---|
protected ECKeyGenerationParameters |
createKeyGenParamsBC(ECParameterSpec p,
SecureRandom r) |
protected ECKeyGenerationParameters |
createKeyGenParamsJCE(ECParameterSpec p,
SecureRandom r) |
protected ECNamedCurveSpec |
createNamedCurveSpec(String curveName) |
KeyPair |
generateKeyPair()
Computes and returns a new unique
KeyPair each time this method
is called. |
void |
initialize(AlgorithmParameterSpec params,
SecureRandom random)
Initializes this
KeyPairGenerator with the given AlgorithmParameterSpec and the given SecureRandom. |
void |
initialize(int strength,
SecureRandom random)
Initializes this
KeyPairGenerator with the given key size and the
given SecureRandom. |
protected void |
initializeNamedCurve(String curveName,
SecureRandom random) |
genKeyPair, getAlgorithm, getInstance, getInstance, getInstance, getProvider, initialize, initializepublic EC()
public EC(String algorithm, ProviderConfiguration configuration)
public void initialize(int strength,
SecureRandom random)
KeyPairGeneratorKeyPairGenerator with the given key size and the
given SecureRandom. The default parameter set will be used.initialize in class KeyPairGeneratorstrength - the key sizerandom - the source of randomnesspublic void initialize(AlgorithmParameterSpec params, SecureRandom random) throws InvalidAlgorithmParameterException
KeyPairGeneratorKeyPairGenerator with the given AlgorithmParameterSpec and the given SecureRandom.initialize in class KeyPairGeneratorparams - the parameters to userandom - the source of randomnessInvalidAlgorithmParameterException - if the specified parameters are not supportedpublic KeyPair generateKeyPair()
KeyPairGeneratorKeyPair each time this method
is called.
This does exactly the same as KeyPairGenerator.genKeyPair().
generateKeyPair in class KeyPairGeneratorKeyPair each time this method is calledprotected ECKeyGenerationParameters createKeyGenParamsBC(ECParameterSpec p, SecureRandom r)
protected ECKeyGenerationParameters createKeyGenParamsJCE(ECParameterSpec p, SecureRandom r)
protected ECNamedCurveSpec createNamedCurveSpec(String curveName) throws InvalidAlgorithmParameterException
protected void initializeNamedCurve(String curveName, SecureRandom random) throws InvalidAlgorithmParameterException