2362N/A * Copyright (c) 1997, 2007, Oracle and/or its affiliates. All rights reserved. 0N/A * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 0N/A * This code is free software; you can redistribute it and/or modify it 0N/A * under the terms of the GNU General Public License version 2 only, as 2362N/A * published by the Free Software Foundation. Oracle designates this 0N/A * particular file as subject to the "Classpath" exception as provided 2362N/A * by Oracle in the LICENSE file that accompanied this code. 0N/A * This code is distributed in the hope that it will be useful, but WITHOUT 0N/A * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 0N/A * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 0N/A * version 2 for more details (a copy is included in the LICENSE file that 0N/A * accompanied this code). 0N/A * You should have received a copy of the GNU General Public License version 0N/A * 2 along with this work; if not, write to the Free Software Foundation, 0N/A * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 2362N/A * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 2362N/A * or visit www.oracle.com if you need additional information or have any 0N/A * This class generates parameters for the Diffie-Hellman algorithm. 0N/A * The parameters are a prime, a base, and optionally the length in bits of 0N/A * the private value. 0N/A * <p>The Diffie-Hellman parameter generation accepts the size in bits of the 0N/A * prime modulus and the size in bits of the random exponent as input. 0N/A * The size of the prime modulus defaults to 1024 bits. 0N/A * @see java.security.AlgorithmParameters 0N/A * @see java.security.spec.AlgorithmParameterSpec 0N/A // The size in bits of the prime modulus 0N/A // The size in bits of the random exponent (private value) 0N/A // The source of randomness 0N/A * Initializes this parameter generator for a certain keysize 0N/A * and source of randomness. 0N/A * The keysize is specified as the size in bits of the prime modulus. 0N/A * @param keysize the keysize (size of prime modulus) in bits 0N/A * @param random the source of randomness 0N/A +
"of 64, and can only range " 0N/A +
"from 512 to 1024 " 0N/A * Initializes this parameter generator with a set of parameter 0N/A * generation values, which specify the size of the prime modulus and 0N/A * the size of the random exponent, both in bits. 0N/A * @param params the set of parameter generation values 0N/A * @param random the source of randomness 0N/A * @exception InvalidAlgorithmParameterException if the given parameter 0N/A * generation values are inappropriate for this parameter generator 0N/A (
"Inappropriate parameter type");
0N/A (
"Modulus size must be multiple of 64, and can only range " 0N/A +
"from 512 to 1024 (inclusive)");
0N/A (
"Exponent size must be greater than zero");
0N/A // Require exponentSize < primeSize 0N/A (
"Exponent size must be less than modulus size");
0N/A * Generates the parameters. 0N/A * @return the new AlgorithmParameters object 0N/A // this should never happen 0N/A // this should never happen, because we provide it 0N/A // this should never happen, because we provide it