public abstract class LunaKeyGeneratorSecret extends KeyGeneratorSpi
setSecretKeysExtractable(true)
was called on LunaSlotManager prior to calling
generateKey in this class.| Modifier | Constructor and Description |
|---|---|
protected |
LunaKeyGeneratorSecret(long mechType,
int keySize) |
| Modifier and Type | Method and Description |
|---|---|
SecretKey |
engineGenerateKey() |
void |
engineInit(AlgorithmParameterSpec spec,
SecureRandom random)
The Luna provider does not support key generation with a supplied
parameter spec.
|
void |
engineInit(int keySize,
SecureRandom random)
Initializes this key generator for a certain keysize.
|
void |
engineInit(SecureRandom random)
The Luna provider provides its own source of randomness on the HSM, so
this method does nothing.
|
protected LunaKeyGeneratorSecret(long mechType,
int keySize)
public void engineInit(int keySize,
SecureRandom random)
throws InvalidParameterException
random
parameter is ignored.engineInit in class KeyGeneratorSpikeySize - the keysize. This is an algorithm-specific metric,
specified in number of bits. The key size must be a multiple of 8
(i.e. byte-aligned)random - unusedInvalidParameterException - if the keysize is invalidpublic void engineInit(SecureRandom random) throws ProviderException
engineInit in class KeyGeneratorSpiProviderExceptionpublic void engineInit(AlgorithmParameterSpec spec, SecureRandom random) throws InvalidAlgorithmParameterException
engineInit(int, SecureRandom) instead.engineInit in class KeyGeneratorSpiUnsupportedOperationException - exceptionInvalidAlgorithmParameterExceptionpublic SecretKey engineGenerateKey()
engineGenerateKey in class KeyGeneratorSpiCopyright 2014-2016 SafeNet Inc