summaryrefslogtreecommitdiff
path: root/bcprov/src/main/java/org/bouncycastle/jcajce/provider/asymmetric/dh/AlgorithmParameterGeneratorSpi.java
diff options
context:
space:
mode:
Diffstat (limited to 'bcprov/src/main/java/org/bouncycastle/jcajce/provider/asymmetric/dh/AlgorithmParameterGeneratorSpi.java')
-rw-r--r--bcprov/src/main/java/org/bouncycastle/jcajce/provider/asymmetric/dh/AlgorithmParameterGeneratorSpi.java9
1 files changed, 1 insertions, 8 deletions
diff --git a/bcprov/src/main/java/org/bouncycastle/jcajce/provider/asymmetric/dh/AlgorithmParameterGeneratorSpi.java b/bcprov/src/main/java/org/bouncycastle/jcajce/provider/asymmetric/dh/AlgorithmParameterGeneratorSpi.java
index b1ef7e5e..8fb8da78 100644
--- a/bcprov/src/main/java/org/bouncycastle/jcajce/provider/asymmetric/dh/AlgorithmParameterGeneratorSpi.java
+++ b/bcprov/src/main/java/org/bouncycastle/jcajce/provider/asymmetric/dh/AlgorithmParameterGeneratorSpi.java
@@ -52,14 +52,7 @@ public class AlgorithmParameterGeneratorSpi
int certainty = PrimeCertaintyCalculator.getDefaultCertainty(strength);
- if (random != null)
- {
- pGen.init(strength, certainty, random);
- }
- else
- {
- pGen.init(strength, certainty, CryptoServicesRegistrar.getSecureRandom());
- }
+ pGen.init(strength, certainty, CryptoServicesRegistrar.getSecureRandom(random));
DHParameters p = pGen.generateParameters();