keyGenerator
Class KeyGeneratorController

java.lang.Object
  extended by keyGenerator.KeyGeneratorController
All Implemented Interfaces:
KeyGeneratorInterface

public class KeyGeneratorController
extends java.lang.Object
implements KeyGeneratorInterface

Controller class of component KeyGenerator. Implements the architecture interface KeyGeneratorInterface.

Used to generate cryptographic keys. A class constant with public accessibility is available for each supported type of key.

Example of usage:

KeyGeneratorController kgc = new KeyGeneratorController(); KeyPair kp = (KeyPair) kgc.generateKey(KeyGeneratorController.KEY_PAIR);

Author:
Karl-Peter Fuchs

Field Summary
static int INTER_MIX_IV
          Initialization vector (IvParameterSpec) used to encrypt (header) data between two mixes.
static int INTER_MIX_KEY
          SecretKey used to encrypt (header) data between two mixes.
static int KEY_PAIR
          KeyPair (public key and a private key) used for asymmetric cryptography.
 
Constructor Summary
KeyGeneratorController()
          Generates a new KeyGenerator component, used to generate cryptographic keys.
 
Method Summary
 java.lang.Object generateKey(int identifier)
          Generates a cryptographic key according to the bypassed identifier.
 void initialize()
          Initializes the this component.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

INTER_MIX_KEY

public static final int INTER_MIX_KEY
SecretKey used to encrypt (header) data between two mixes. Key size and type are specified in the property file.

See Also:
Constant Field Values

INTER_MIX_IV

public static final int INTER_MIX_IV
Initialization vector (IvParameterSpec) used to encrypt (header) data between two mixes.

See Also:
Constant Field Values

KEY_PAIR

public static final int KEY_PAIR
KeyPair (public key and a private key) used for asymmetric cryptography. Key size and type are specified in the property file.

See Also:
Constant Field Values
Constructor Detail

KeyGeneratorController

public KeyGeneratorController()
Generates a new KeyGenerator component, used to generate cryptographic keys. A class constant with public accessibility is available for each supported type of key.

Method Detail

initialize

public void initialize()
Initializes the this component.


generateKey

public java.lang.Object generateKey(int identifier)
Generates a cryptographic key according to the bypassed identifier.

Specified by:
generateKey in interface KeyGeneratorInterface
Parameters:
identifier - Type of key to be generated (see class constants).
Returns:
The generated cryptographic key.