public abstract class LunaKeyGeneratorSecret
extends javax.crypto.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 |
---|---|
javax.crypto.SecretKey |
engineGenerateKey() |
void |
engineInit(java.security.spec.AlgorithmParameterSpec spec,
java.security.SecureRandom random)
The Luna provider does not support key generation with a supplied parameter spec.
|
void |
engineInit(int keySize,
java.security.SecureRandom random)
Initializes this key generator for a certain keysize.
|
void |
engineInit(java.security.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, java.security.SecureRandom random) throws java.security.InvalidParameterException
random
parameter is ignored.engineInit
in class javax.crypto.KeyGeneratorSpi
keySize
- 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
- unusedjava.security.InvalidParameterException
- if the keysize is invalidpublic void engineInit(java.security.SecureRandom random) throws java.security.ProviderException
engineInit
in class javax.crypto.KeyGeneratorSpi
java.security.ProviderException
public void engineInit(java.security.spec.AlgorithmParameterSpec spec, java.security.SecureRandom random) throws java.security.InvalidAlgorithmParameterException
engineInit(int, SecureRandom)
instead.engineInit
in class javax.crypto.KeyGeneratorSpi
java.lang.UnsupportedOperationException
- exceptionjava.security.InvalidAlgorithmParameterException
public javax.crypto.SecretKey engineGenerateKey()
engineGenerateKey
in class javax.crypto.KeyGeneratorSpi
Copyright 2014-2018 SafeNet. All rights reserved.