Note: can take a while...
6667686970717273747576
else { pGen.init(strength, 20, new SecureRandom()); } DHParameters p = pGen.generateParameters(); AlgorithmParameters params; try {
178179180181182183184185186187188
if (!initialised) { DHParametersGenerator pGen = new DHParametersGenerator(); pGen.init(strength, certainty, random); param = new DHKeyGenerationParameters(random, pGen.generateParameters()); engine.init(param); initialised = true; } AsymmetricCipherKeyPair pair = engine.generateKeyPair();
6970717273747576777879
141142143144145146147148149150151
{ DHParametersGenerator pGen = new DHParametersGenerator(); pGen.init(size, 10, new SecureRandom()); DHParameters dhParams = pGen.generateParameters(); DHKeyGenerationParameters params = new DHKeyGenerationParameters(new SecureRandom(), dhParams); DHBasicKeyPairGenerator kpGen = new DHBasicKeyPairGenerator();
149150151152153154155156157158159
181182183184185186187188189190191
5556575859606162636465
949596979899100101102103104
DHParametersGenerator pGen = new DHParametersGenerator(); pGen.init(strength, certainty, random); param = new DHKeyGenerationParameters(random, pGen.generateParameters()); params.put(paramStrength, param); } } }
173174175176177178179180181182183
{ DHParametersGenerator pGen = new DHParametersGenerator(); pGen.init(strength, certainty, random); param = new DHKeyGenerationParameters(random, pGen.generateParameters()); params.put(paramStrength, param); } engine.init(param);