java.lang.Object
org.bouncycastle.crypto.KeyGenerationParameters
- Direct Known Subclasses:
MLKEMKeyGenerationParameters
The base class for parameters to key generators.
Field Summary
FieldsModifier and TypeFieldDescriptionprivate SecureRandomSource of randomness for the generation.private intStrength the generated key should have.Constructor Summary
ConstructorsConstructorDescriptionKeyGenerationParameters(SecureRandom random, int strength) Initialise the generator with a source of randomness and a strength (in bits).Method Summary
All MethodsModifier and TypeMethodDescriptionReturn the random source associated with this generator.intReturn the bit strength for keys produced by this generator,
Field Details
random
Source of randomness for the generation.strength
private int strengthStrength the generated key should have.
Constructor Details
KeyGenerationParameters
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 Details
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).