Class DHParametersGenerator
java.lang.Object
org.bouncycastle.crypto.generators.DHParametersGenerator
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionwhich generates the p and g values from the given parameters, returning the DHParameters object.void
init
(int size, int certainty, SecureRandom random) Initialise the parameters generator.
-
Constructor Details
-
DHParametersGenerator
public DHParametersGenerator()
-
-
Method Details
-
init
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
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.
-