public class BaseKeyGenerator extends KeyGeneratorSpi
| Modifier and Type | Field and Description |
|---|---|
protected String |
algName |
protected int |
defaultKeySize |
protected CipherKeyGenerator |
engine |
protected int |
keySize |
protected boolean |
uninitialised |
| Modifier | Constructor and Description |
|---|---|
protected |
BaseKeyGenerator(String algName,
int defaultKeySize,
CipherKeyGenerator engine) |
| Modifier and Type | Method and Description |
|---|---|
protected SecretKey |
engineGenerateKey()
Generates a secret key.
|
protected void |
engineInit(AlgorithmParameterSpec params,
SecureRandom random)
Initializes this
KeyGeneratorSpi instance with the specified
algorithm parameters and randomness source. |
protected void |
engineInit(int keySize,
SecureRandom random)
Initializes this
KeyGenerator instance for the specified key
size (in bits) using the specified randomness source. |
protected void |
engineInit(SecureRandom random)
Initializes this
KeyGenerator with the specified randomness
source. |
protected String algName
protected int keySize
protected int defaultKeySize
protected CipherKeyGenerator engine
protected boolean uninitialised
protected BaseKeyGenerator(String algName, int defaultKeySize, CipherKeyGenerator engine)
protected void engineInit(AlgorithmParameterSpec params, SecureRandom random) throws InvalidAlgorithmParameterException
KeyGeneratorSpiKeyGeneratorSpi instance with the specified
algorithm parameters and randomness source.engineInit in class KeyGeneratorSpiparams - the parameters for the key generation algorithm.random - the randomness source for any random bytes.InvalidAlgorithmParameterException - if the parameters cannot be uses to initialize this key
generator algorithm.protected void engineInit(SecureRandom random)
KeyGeneratorSpiKeyGenerator with the specified randomness
source.engineInit in class KeyGeneratorSpirandom - the randomness source for any random bytes.protected void engineInit(int keySize,
SecureRandom random)
KeyGeneratorSpiKeyGenerator instance for the specified key
size (in bits) using the specified randomness source.engineInit in class KeyGeneratorSpikeySize - the size of the key (in bits).random - the randomness source for any random bytes.protected SecretKey engineGenerateKey()
KeyGeneratorSpiengineGenerateKey in class KeyGeneratorSpi