org.bouncycastle.crypto
Class KeyGenerationParameters

java.lang.Object
  extended by org.bouncycastle.crypto.KeyGenerationParameters
Direct Known Subclasses:
DHKeyGenerationParameters, DSAKeyGenerationParameters, ECKeyGenerationParameters, ElGamalKeyGenerationParameters, GOST3410KeyGenerationParameters, NaccacheSternKeyGenerationParameters, RSAKeyGenerationParameters

public class KeyGenerationParameters
extends java.lang.Object

The base class for parameters to key generators.


Field Summary
private  java.security.SecureRandom random
           
private  int strength
           
 
Constructor Summary
KeyGenerationParameters(java.security.SecureRandom random, int strength)
          initialise the generator with a source of randomness and a strength (in bits).
 
Method Summary
 java.security.SecureRandom getRandom()
          return the random source associated with this generator.
 int getStrength()
          return the bit strength for keys produced by this generator,
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

random

private java.security.SecureRandom random

strength

private int strength
Constructor Detail

KeyGenerationParameters

public KeyGenerationParameters(java.security.SecureRandom random,
                               int strength)
initialise the generator with a source of randomness and a strength (in bits).

Parameters:
random - the random byte source.
strength - the size, in bits, of the keys we want to produce.
Method Detail

getRandom

public java.security.SecureRandom getRandom()
return the random source associated with this generator.

Returns:
the generators random source.

getStrength

public int getStrength()
return the bit strength for keys produced by this generator,

Returns:
the strength of the keys this generator produces (in bits).