de.flexiprovider.core.desede
Class DESedeKeyGenerator

java.lang.Object
  |
  +--javax.crypto.KeyGeneratorSpi
        |
        +--de.flexiprovider.api.keys.SecretKeyGenerator
              |
              +--de.flexiprovider.core.desede.DESedeKeyGenerator

public class DESedeKeyGenerator
extends SecretKeyGenerator

This class is used to generate keys for the DESede block cipher.

Author:
Norbert Trummel, Sylvain Franke

Constructor Summary
DESedeKeyGenerator()
           
 
Method Summary
 SecretKey generateKey()
          Generate a DESede key.
 void init(AlgorithmParameterSpec params, SecureRandom random)
          Since DESede keys are of a fixed size and do not require any parameters, this method only sets the source of randomness.
 void init(int strength, SecureRandom random)
          Since DESede keys are of a fixed size, this method only sets the source of randomness.
 void init(SecureRandom random)
          Initialize the key generator with the given source of randomness.
 
Methods inherited from class de.flexiprovider.api.keys.SecretKeyGenerator
engineGenerateKey, engineInit, engineInit, engineInit, init, init, init
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DESedeKeyGenerator

public DESedeKeyGenerator()
Method Detail

init

public void init(AlgorithmParameterSpec params,
                 SecureRandom random)
Since DESede keys are of a fixed size and do not require any parameters, this method only sets the source of randomness.
Overrides:
init in class SecretKeyGenerator
Parameters:
params - the parameters (not used)
random - the source of randomness

init

public void init(int strength,
                 SecureRandom random)
Since DESede keys are of a fixed size, this method only sets the source of randomness.
Overrides:
init in class SecretKeyGenerator
Parameters:
strength - the key strength (not used)
random - the source of randomness for this key generator

init

public void init(SecureRandom random)
Initialize the key generator with the given source of randomness.
Overrides:
init in class SecretKeyGenerator
Parameters:
random - the source of randomness

generateKey

public SecretKey generateKey()
Generate a DESede key.
Overrides:
generateKey in class SecretKeyGenerator
Returns:
the generated DESedeKey