Class DHParametersGenerator
- java.lang.Object
-
- org.bouncycastle.crypto.generators.DHParametersGenerator
-
public class DHParametersGenerator extends java.lang.Object
-
-
Constructor Summary
Constructors Constructor Description DHParametersGenerator()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description DHParameters
generateParameters()
which generates the p and g values from the given parameters, returning the DHParameters object.void
init(int size, int certainty, java.security.SecureRandom random)
Initialise the parameters generator.
-
-
-
Method Detail
-
init
public void init(int size, int certainty, java.security.SecureRandom random)
Initialise the parameters generator.- Parameters:
size
- bit length for the prime pcertainty
- level of certainty for the prime number testsrandom
- a source of randomness
-
generateParameters
public DHParameters generateParameters()
which generates the p and g values from the given parameters, returning the DHParameters object.Note: can take a while...
- Returns:
- a generated Diffie-Hellman parameters object.
-
-