de.fhg.igd.crypto
Class PBEParameterGenerator

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

public class PBEParameterGenerator
extends AlgorithmParameterGeneratorSpi

This class generates parameters for PBE according to PKCS#5. Encoding and Decoding conforms to ASN.1/DER as set forth in said standard. The PBEParameterSpec and subclasses thereof are supported for initialising the parameters.

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

Field Summary
protected  SecureRandom rnd_
          The source of randomness used to generate IVs.
protected  int size_
          The iteration count.
 
Constructor Summary
PBEParameterGenerator()
           
 
Method Summary
protected  AlgorithmParameters engineGenerateParameters()
          Generates the parameters.
protected  void engineInit(AlgorithmParameterSpec paramSpec, 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 iteration count.

Constructor Detail

PBEParameterGenerator

public PBEParameterGenerator()
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 iteration count of the PBE. This must be in the range of [1,0x7fffff].
random - The source of randomness.

engineInit

protected void engineInit(AlgorithmParameterSpec paramSpec,
                          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.