Class KeyPairGeneratorSpi.EC
- java.lang.Object
-
- java.security.KeyPairGeneratorSpi
-
- java.security.KeyPairGenerator
-
- org.bouncycastle.jcajce.provider.asymmetric.ec.KeyPairGeneratorSpi
-
- org.bouncycastle.jcajce.provider.asymmetric.ec.KeyPairGeneratorSpi.EC
-
- Direct Known Subclasses:
KeyPairGeneratorSpi.ECDH,KeyPairGeneratorSpi.ECDHC,KeyPairGeneratorSpi.ECDSA,KeyPairGeneratorSpi.ECMQV
- Enclosing class:
- KeyPairGeneratorSpi
public static class KeyPairGeneratorSpi.EC extends KeyPairGeneratorSpi
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.bouncycastle.jcajce.provider.asymmetric.ec.KeyPairGeneratorSpi
KeyPairGeneratorSpi.EC, KeyPairGeneratorSpi.ECDH, KeyPairGeneratorSpi.ECDHC, KeyPairGeneratorSpi.ECDSA, KeyPairGeneratorSpi.ECMQV
-
-
Constructor Summary
Constructors Constructor Description EC()EC(String algorithm, ProviderConfiguration configuration)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected ECKeyGenerationParameterscreateKeyGenParamsBC(ECParameterSpec p, SecureRandom r)protected ECKeyGenerationParameterscreateKeyGenParamsJCE(ECParameterSpec p, SecureRandom r)protected ECNamedCurveSpeccreateNamedCurveSpec(String curveName)KeyPairgenerateKeyPair()Computes and returns a new uniqueKeyPaireach time this method is called.voidinitialize(int strength, SecureRandom random)Initializes thisKeyPairGeneratorwith the given key size and the givenSecureRandom.voidinitialize(AlgorithmParameterSpec params, SecureRandom random)Initializes thisKeyPairGeneratorwith the givenAlgorithmParameterSpecand the givenSecureRandom.protected voidinitializeNamedCurve(String curveName, SecureRandom random)-
Methods inherited from class java.security.KeyPairGenerator
genKeyPair, getAlgorithm, getInstance, getInstance, getInstance, getProvider, initialize, initialize
-
-
-
-
Constructor Detail
-
EC
public EC()
-
EC
public EC(String algorithm, ProviderConfiguration configuration)
-
-
Method Detail
-
initialize
public void initialize(int strength, SecureRandom random)Description copied from class:KeyPairGeneratorInitializes thisKeyPairGeneratorwith the given key size and the givenSecureRandom. The default parameter set will be used.- Overrides:
initializein classKeyPairGenerator- Parameters:
strength- the key sizerandom- the source of randomness
-
initialize
public void initialize(AlgorithmParameterSpec params, SecureRandom random) throws InvalidAlgorithmParameterException
Description copied from class:KeyPairGeneratorInitializes thisKeyPairGeneratorwith the givenAlgorithmParameterSpecand the givenSecureRandom.- Overrides:
initializein classKeyPairGenerator- Parameters:
params- the parameters to userandom- the source of randomness- Throws:
InvalidAlgorithmParameterException- if the specified parameters are not supported
-
generateKeyPair
public KeyPair generateKeyPair()
Description copied from class:KeyPairGeneratorComputes and returns a new uniqueKeyPaireach time this method is called.This does exactly the same as
KeyPairGenerator.genKeyPair().- Overrides:
generateKeyPairin classKeyPairGenerator- Returns:
- a new unique
KeyPaireach time this method is called
-
createKeyGenParamsBC
protected ECKeyGenerationParameters createKeyGenParamsBC(ECParameterSpec p, SecureRandom r)
-
createKeyGenParamsJCE
protected ECKeyGenerationParameters createKeyGenParamsJCE(ECParameterSpec p, SecureRandom r)
-
createNamedCurveSpec
protected ECNamedCurveSpec createNamedCurveSpec(String curveName) throws InvalidAlgorithmParameterException
-
initializeNamedCurve
protected void initializeNamedCurve(String curveName, SecureRandom random) throws InvalidAlgorithmParameterException
-
-