public class LunaKeyPairGeneratorEc extends KeyPairGeneratorSpi
| Modifier and Type | Field and Description |
|---|---|
protected LunaNamedCurve |
mCurve |
| Constructor and Description |
|---|
LunaKeyPairGeneratorEc() |
| Modifier and Type | Method and Description |
|---|---|
KeyPair |
generateKeyPair()
Generates a key pair.
|
void |
initialize(AlgorithmParameterSpec params,
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,
SecureRandom random)
Initialize the key pair generator with the given curve id.
|
protected LunaNamedCurve mCurve
public void initialize(AlgorithmParameterSpec params, SecureRandom random) throws InvalidAlgorithmParameterException
The Luna HSM supplies its own source of randomness so the random
parameter is ignored.
initialize in class KeyPairGeneratorSpiparams - the parameter set used to generate the keys. Must be an
object of class ECParameterSpecrandom - unusedInvalidAlgorithmParameterExceptionpublic void initialize(int curveID,
SecureRandom random)
initialize(AlgorithmParameterSpec, SecureRandom)
should be used instead.initialize in class 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 KeyPair generateKeyPair() throws LunaException
generateKeyPair in class KeyPairGeneratorSpiLunaException - exceptionKeyPairGeneratorSpi.generateKeyPair()Copyright 2014-2016 SafeNet Inc