Top Description Fields Constructors Methods
org.bouncycastle.crypto

public Class KeyGenerationParameters

extends Object
Class Inheritance
Known Direct Subclasses
org.bouncycastle.crypto.params.CramerShoupKeyGenerationParameters, org.bouncycastle.crypto.params.DHKeyGenerationParameters, org.bouncycastle.crypto.params.DSAKeyGenerationParameters, org.bouncycastle.crypto.params.NaccacheSternKeyGenerationParameters, org.bouncycastle.crypto.params.ECKeyGenerationParameters, org.bouncycastle.crypto.params.Ed25519KeyGenerationParameters, org.bouncycastle.crypto.params.Ed448KeyGenerationParameters, org.bouncycastle.crypto.params.ElGamalKeyGenerationParameters, org.bouncycastle.crypto.params.GOST3410KeyGenerationParameters, org.bouncycastle.crypto.params.RSAKeyGenerationParameters, org.bouncycastle.crypto.params.X25519KeyGenerationParameters, org.bouncycastle.crypto.params.X448KeyGenerationParameters, org.bouncycastle.pqc.crypto.bike.BIKEKeyGenerationParameters, org.bouncycastle.pqc.crypto.cmce.CMCEKeyGenerationParameters, org.bouncycastle.pqc.crypto.crystals.dilithium.DilithiumKeyGenerationParameters, org.bouncycastle.pqc.crypto.crystals.kyber.KyberKeyGenerationParameters, org.bouncycastle.pqc.crypto.falcon.FalconKeyGenerationParameters, org.bouncycastle.pqc.crypto.frodo.FrodoKeyGenerationParameters, org.bouncycastle.pqc.crypto.gemss.GeMSSKeyGenerationParameters, org.bouncycastle.pqc.crypto.hqc.HQCKeyGenerationParameters, org.bouncycastle.pqc.crypto.lms.HSSKeyGenerationParameters, org.bouncycastle.pqc.crypto.lms.LMSKeyGenerationParameters, org.bouncycastle.pqc.crypto.ntru.NTRUKeyGenerationParameters, org.bouncycastle.pqc.crypto.ntruprime.NTRULPRimeKeyGenerationParameters, org.bouncycastle.pqc.crypto.ntruprime.SNTRUPrimeKeyGenerationParameters, org.bouncycastle.pqc.crypto.picnic.PicnicKeyGenerationParameters, org.bouncycastle.pqc.crypto.rainbow.RainbowKeyGenerationParameters, org.bouncycastle.pqc.crypto.saber.SABERKeyGenerationParameters, org.bouncycastle.pqc.crypto.sphincs.SPHINCS256KeyGenerationParameters, org.bouncycastle.pqc.crypto.sphincsplus.SPHINCSPlusKeyGenerationParameters, org.bouncycastle.pqc.crypto.xmss.XMSSKeyGenerationParameters, org.bouncycastle.pqc.crypto.xmss.XMSSMTKeyGenerationParameters, org.bouncycastle.pqc.legacy.crypto.gmss.GMSSKeyGenerationParameters, org.bouncycastle.pqc.legacy.crypto.mceliece.McElieceCCA2KeyGenerationParameters, org.bouncycastle.pqc.legacy.crypto.mceliece.McElieceKeyGenerationParameters, org.bouncycastle.pqc.legacy.crypto.ntru.NTRUEncryptionKeyGenerationParameters, org.bouncycastle.pqc.legacy.crypto.ntru.NTRUSigningKeyGenerationParameters, org.bouncycastle.pqc.legacy.crypto.qtesla.QTESLAKeyGenerationParameters, org.bouncycastle.pqc.legacy.crypto.rainbow.RainbowKeyGenerationParameters
Imports
java.security.SecureRandom

The base class for parameters to key generators.

Field Summary

Modifier and TypeField and Description
private SecureRandom
private int

Constructor Summary

AccessConstructor and Description
public
KeyGenerationParameters(SecureRandom
the random byte source.
random
,
int
the size, in bits, of the keys we want to produce.
strength
)

initialise the generator with a source of randomness and a strength (in bits).

Method Summary

Modifier and TypeMethod and Description
public SecureRandom

Returns:

the generators random source.
getRandom
()

return the random source associated with this generator.

public int

Returns:

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

return the bit strength for keys produced by this generator,

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

randomback to summary
private SecureRandom random
strengthback to summary
private int strength

Constructor Detail

KeyGenerationParametersback to summary
public KeyGenerationParameters(SecureRandom random, int strength)

initialise the generator with a source of randomness and a strength (in bits).

Parameters
random:SecureRandom

the random byte source.

strength:int

the size, in bits, of the keys we want to produce.

Method Detail

getRandomback to summary
public SecureRandom getRandom()

return the random source associated with this generator.

Returns:SecureRandom

the generators random source.

getStrengthback to summary
public int getStrength()

return the bit strength for keys produced by this generator,

Returns:int

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