Package org.bouncycastle.crypto
Class KeyGenerationParameters
- java.lang.Object
-
- org.bouncycastle.crypto.KeyGenerationParameters
-
- Direct Known Subclasses:
DHKeyGenerationParameters,DSAKeyGenerationParameters,ECKeyGenerationParameters,RSAKeyGenerationParameters
public class KeyGenerationParameters extends Object
The base class for parameters to key generators.
-
-
Constructor Summary
Constructors Constructor Description KeyGenerationParameters(SecureRandom random, int strength)initialise the generator with a source of randomness and a strength (in bits).
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description SecureRandomgetRandom()return the random source associated with this generator.intgetStrength()return the bit strength for keys produced by this generator,
-
-
-
Constructor Detail
-
KeyGenerationParameters
public KeyGenerationParameters(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 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).
-
-