public class LunaKeyPairGeneratorEc
extends java.security.KeyPairGeneratorSpi
| Modifier and Type | Field and Description |
|---|---|
protected LunaPkcs11Attributes |
attributes |
protected LunaNamedCurve |
mCurve |
protected long |
mechType |
| Constructor and Description |
|---|
LunaKeyPairGeneratorEc() |
LunaKeyPairGeneratorEc(long mechType) |
| Modifier and Type | Method and Description |
|---|---|
java.security.KeyPair |
generateKeyPair()
Generates a key pair.
|
void |
initialize(java.security.spec.AlgorithmParameterSpec params,
java.security.SecureRandom random)
Initializes the key pair generator with the given parameter spec.
|
void |
initialize(int curveID)
Initialize the key pair generator with the given curve id.
|
void |
initialize(int curveID,
java.security.SecureRandom random)
Initialize the key pair generator with the given curve id.
|
protected LunaNamedCurve mCurve
protected long mechType
protected LunaPkcs11Attributes attributes
public LunaKeyPairGeneratorEc()
public LunaKeyPairGeneratorEc(long mechType)
public void initialize(java.security.spec.AlgorithmParameterSpec params,
java.security.SecureRandom random)
throws java.security.InvalidAlgorithmParameterException
The Luna HSM supplies its own source of randomness so the random parameter is ignored.
initialize in class java.security.KeyPairGeneratorSpiparams - the parameter set used to generate the keys. Must be an object of class ECParameterSpecrandom - unusedjava.security.InvalidAlgorithmParameterExceptionpublic void initialize(int curveID,
java.security.SecureRandom random)
initialize(AlgorithmParameterSpec, SecureRandom) should be used instead.initialize in class java.security.KeyPairGeneratorSpicurveID - Curve ID to use in key generationrandom - Ignored -- the HSM uses its own RNGpublic void initialize(int curveID)
initialize(AlgorithmParameterSpec, SecureRandom) should be used instead.curveID - Curve ID to use in key generationpublic java.security.KeyPair generateKeyPair()
throws LunaException
generateKeyPair in class java.security.KeyPairGeneratorSpiLunaException - exceptionKeyPairGeneratorSpi.generateKeyPair()Copyright 2014-2018 SafeNet. All rights reserved.