public final class

DESedeKeyGenerator

extends KeyGeneratorSpi
java.lang.Object
   ↳ javax.crypto.KeyGeneratorSpi
     ↳ com.sun.crypto.provider.DESedeKeyGenerator

Class Overview

This class generates a Triple DES key.

Summary

Public Constructors
DESedeKeyGenerator()
Verify the SunJCE provider in the constructor.
Protected Methods
SecretKey engineGenerateKey()
Generates the Triple DES key.
void engineInit(int keysize, SecureRandom random)
Initializes this key generator for a certain keysize, using the given source of randomness.
void engineInit(SecureRandom random)
Initializes this key generator.
void engineInit(AlgorithmParameterSpec params, SecureRandom random)
Initializes this key generator with the specified parameter set and a user-provided source of randomness.
[Expand]
Inherited Methods
From class javax.crypto.KeyGeneratorSpi
From class java.lang.Object

Public Constructors

public DESedeKeyGenerator ()

Verify the SunJCE provider in the constructor.

Throws
SecurityException if fails to verify its own integrity

Protected Methods

protected SecretKey engineGenerateKey ()

Generates the Triple DES key.

Returns
  • the new Triple DES key

protected void engineInit (int keysize, SecureRandom random)

Initializes this key generator for a certain keysize, using the given source of randomness.

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

protected void engineInit (SecureRandom random)

Initializes this key generator.

Parameters
random the source of randomness for this generator

protected void engineInit (AlgorithmParameterSpec params, SecureRandom random)

Initializes this key generator with the specified parameter set and a user-provided source of randomness.

Parameters
params the key generation parameters
random the source of randomness for this key generator
Throws
InvalidAlgorithmParameterException if params is inappropriate for this key generator