Class DESedeKeyGenerator
- java.lang.Object
-
- javax.crypto.KeyGeneratorSpi
-
- com.fortanix.sdkms.jce.provider.keys.sym.desede.DESedeKeyGenerator
-
public final class DESedeKeyGenerator extends KeyGeneratorSpi
-
-
Constructor Summary
Constructors Constructor Description DESedeKeyGenerator()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected SecretKey
engineGenerateKey()
Generates the Triple DES key.protected void
engineInit(int keysize, SecureRandom random)
Initializes this key generator for a certain keysize, using the given source of randomness.protected void
engineInit(SecureRandom random)
Initializes this key generator.protected void
engineInit(AlgorithmParameterSpec params, SecureRandom random)
Initializes this key generator with the specified parameter set and a user-provided source of randomness.
-
-
-
Method Detail
-
engineInit
protected void engineInit(SecureRandom random)
Initializes this key generator.- Specified by:
engineInit
in classKeyGeneratorSpi
- Parameters:
random
- the source of randomness for this generator
-
engineInit
protected void engineInit(AlgorithmParameterSpec params, SecureRandom random) throws InvalidAlgorithmParameterException
Initializes this key generator with the specified parameter set and a user-provided source of randomness.- Specified by:
engineInit
in classKeyGeneratorSpi
- Parameters:
params
- the key generation parametersrandom
- the source of randomness for this key generator- Throws:
InvalidAlgorithmParameterException
- ifparams
is inappropriate for this key generator
-
engineInit
protected void engineInit(int keysize, SecureRandom random)
Initializes this key generator for a certain keysize, using the given source of randomness.- Specified by:
engineInit
in classKeyGeneratorSpi
- Parameters:
keysize
- the keysize. This is an algorithm-specific metric specified in number of bits. A keysize with 112 bits of entropy corresponds to a Triple DES key with 2 intermediate keys, and a keysize with 168 bits of entropy corresponds to a Triple DES key with 3 intermediate keys.random
- the source of randomness for this key generator
-
engineGenerateKey
protected SecretKey engineGenerateKey()
Generates the Triple DES key.- Specified by:
engineGenerateKey
in classKeyGeneratorSpi
- Returns:
- the new Triple DES key
-
-