de.fhg.igd.crypto
Class RC2ParameterGenerator

java.lang.Object
  extended by java.security.AlgorithmParameterGeneratorSpi
      extended by de.fhg.igd.crypto.RC2ParameterGenerator

public class RC2ParameterGenerator
extends AlgorithmParameterGeneratorSpi

This class generates parameters for RC2 according to RFC 2311 and RFC 2268. Encoding and Decoding conforms to ASN.1/DER as set forth in said RFCs. The RC2ParameterSpec and subclasses thereof are supported for initialising the parameters.

Version:
"$Id: RC2ParameterGenerator.java 1913 2007-08-08 02:41:53Z jpeters $"
Author:
Volker Roth
See Also:
DESParameters, AlgorithmParameterSpec

Field Summary
protected  SecureRandom rnd_
          The source of randomness used to generate IVs.
protected  int size_
          The key size.
 
Constructor Summary
RC2ParameterGenerator()
           
 
Method Summary
protected  AlgorithmParameters engineGenerateParameters()
          Generates the parameters.
protected  void engineInit(AlgorithmParameterSpec spec, SecureRandom random)
          Initializes this parameter generator with a set of algorithm-specific parameter generation values.
protected  void engineInit(int size, SecureRandom random)
          Initializes this parameter generator for a certain size and source of randomness.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

rnd_

protected SecureRandom rnd_
The source of randomness used to generate IVs.


size_

protected int size_
The key size.

Constructor Detail

RC2ParameterGenerator

public RC2ParameterGenerator()
Method Detail

engineInit

protected void engineInit(int size,
                          SecureRandom random)
Initializes this parameter generator for a certain size and source of randomness. This method does nothing.

Specified by:
engineInit in class AlgorithmParameterGeneratorSpi
Parameters:
size - the size (number of bits).
random - the source of randomness.

engineInit

protected void engineInit(AlgorithmParameterSpec spec,
                          SecureRandom random)
                   throws InvalidAlgorithmParameterException
Initializes this parameter generator with a set of algorithm-specific parameter generation values.

Specified by:
engineInit in class AlgorithmParameterGeneratorSpi
Parameters:
spec - The set of algorithm-specific parameter generation values.
random - the source of randomness.
Throws:
InvalidAlgorithmParameterException - if the given parameter generation values are inappropriate for this parameter generator.

engineGenerateParameters

protected AlgorithmParameters engineGenerateParameters()
Generates the parameters.

Specified by:
engineGenerateParameters in class AlgorithmParameterGeneratorSpi
Returns:
the new AlgorithmParameters object.


Copyright © Fraunhofer Gesellschaft. All Rights Reserved.