public class KeyPairGenerator extends KeyPairGeneratorSpi
Generated keys are suitable for:
| Modifier and Type | Field and Description |
|---|---|
protected static int |
DEFAULT_KEYSIZE |
protected EdDSAParameterSpec |
edParams |
protected boolean |
initialized |
protected SecureRandom |
random |
| Constructor and Description |
|---|
KeyPairGenerator() |
| Modifier and Type | Method and Description |
|---|---|
protected EdDSANamedCurveSpec |
createNamedCurveSpec(String curveName)
Create an EdDSANamedCurveSpec from the provided curve name.
|
KeyPair |
generateKeyPair() |
void |
initialize(AlgorithmParameterSpec params,
SecureRandom random) |
void |
initialize(int keysize,
SecureRandom random) |
protected static final int DEFAULT_KEYSIZE
protected EdDSAParameterSpec edParams
protected boolean initialized
protected SecureRandom random
protected EdDSANamedCurveSpec createNamedCurveSpec(String curveName) throws InvalidAlgorithmParameterException
curveName - the EdDSA named curve.InvalidAlgorithmParameterException - if the named curve is unknown.public KeyPair generateKeyPair()
generateKeyPair in class KeyPairGeneratorSpipublic void initialize(AlgorithmParameterSpec params, SecureRandom random) throws InvalidAlgorithmParameterException
initialize in class KeyPairGeneratorSpiInvalidAlgorithmParameterExceptionpublic void initialize(int keysize,
SecureRandom random)
initialize in class KeyPairGeneratorSpi