Top Fields Constructors Methods
org.bouncycastle.crypto.fips

pack-priv Class DhParametersGenerator

extends Object
Class Inheritance
Imports
java.math.BigInteger, java.security.SecureRandom, org.bouncycastle.crypto.internal.params.DhParameters

Field Summary

Modifier and TypeField and Description
private int
private SecureRandom
private int
private static final BigInteger

Constructor Summary

AccessConstructor and Description
pack-priv

Method Summary

Modifier and TypeMethod and Description
public DhParameters
generateParameters()

which generates the p and g values from the given parameters, returning the DHParameters object.

public void
init(int
bit length for the prime p
size
,
int
level of certainty for the prime number tests
certainty
,
SecureRandom
a source of randomness
random
)

Initialise the parameters generator.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

certaintyback to summary
private int certainty
randomback to summary
private SecureRandom random
sizeback to summary
private int size
TWOback to summary
private static final BigInteger TWO

Constructor Detail

DhParametersGeneratorback to summary
pack-priv DhParametersGenerator()

Method Detail

generateParametersback to summary
public DhParameters generateParameters()

which generates the p and g values from the given parameters, returning the DHParameters object.

Note

can take a while...

initback to summary
public void init(int size, int certainty, SecureRandom random)

Initialise the parameters generator.

Parameters
size:int

bit length for the prime p

certainty:int

level of certainty for the prime number tests

random:SecureRandom

a source of randomness