|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjavax.crypto.KeyGeneratorSpi
public abstract class KeyGeneratorSpi
The Service Provider Interface (SPI) for the KeyGenerator
class.
Providers wishing to implement a key generator must subclass this
and provide an appropriate implementation for all the abstract
methods below, and provide an appropriate entry in the master Provider
class (the service name for key generators is
"KeyGenerator"
).
KeyGenerator
Constructor Summary | |
---|---|
KeyGeneratorSpi()
Create a new key generator SPI. |
Method Summary | |
---|---|
protected abstract SecretKey |
engineGenerateKey()
Generate a key, returning it as a SecretKey . |
protected abstract void |
engineInit(AlgorithmParameterSpec params,
SecureRandom random)
Initialize this key generator with parameters and a source of randomness. |
protected abstract void |
engineInit(int keySize,
SecureRandom random)
Initialize this key generator with a key size (in bits) and a source of randomness. |
protected abstract void |
engineInit(SecureRandom random)
Initialize this key generator with a source of randomness; the implementation should use reasonable default parameters (such as generated key size). |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public KeyGeneratorSpi()
Method Detail |
---|
protected abstract SecretKey engineGenerateKey()
SecretKey
.
protected abstract void engineInit(AlgorithmParameterSpec params, SecureRandom random) throws InvalidAlgorithmParameterException
params
- The parameters.random
- The source of randomness.
InvalidAlgorithmParameterException
- If the
parameters are inappropriate for this instance.protected abstract void engineInit(int keySize, SecureRandom random)
keySize
- The target key size, in bits.random
- The source of randomness.
InvalidParameterException
- If the
key size is illogical or unsupported.protected abstract void engineInit(SecureRandom random)
random
- The source of randomness.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |