173174175176177178179180181182183
{ DHParametersGenerator pGen = new DHParametersGenerator(); pGen.init(strength, certainty, random); param = new DHKeyGenerationParameters(random, pGen.generateParameters()); params.put(paramStrength, param); } engine.init(param);
6970717273747576777879
else { pGen.init(strength, 20, new SecureRandom()); } DHParameters p = pGen.generateParameters(); AlgorithmParameters params; try {
244245246247248249250251252253254
if (!initialised) { DSAParametersGenerator pGen = new DSAParametersGenerator(); pGen.init(strength, certainty, random); param = new DSAKeyGenerationParameters(random, pGen.generateParameters()); engine.init(param); initialised = true; } AsymmetricCipherKeyPair pair = engine.generateKeyPair();
124125126127128129130131132133134
else { pGen.init(strength, 20, new SecureRandom()); } DSAParameters p = pGen.generateParameters(); AlgorithmParameters params; try {
315316317318319320321322323324325
if (!initialised) { ElGamalParametersGenerator pGen = new ElGamalParametersGenerator(); pGen.init(strength, certainty, random); param = new ElGamalKeyGenerationParameters(random, pGen.generateParameters()); engine.init(param); initialised = true; } AsymmetricCipherKeyPair pair = engine.generateKeyPair();
218219220221222223224225226227228
else { pGen.init(strength, 20, new SecureRandom()); } ElGamalParameters p = pGen.generateParameters(); AlgorithmParameters params; try {
166167168169170171172173174175176
else { pGen.init(strength, 2, new SecureRandom()); } GOST3410Parameters p = pGen.generateParameters(); AlgorithmParameters params; try {