48 * <li>Initialize the generator by casting the result to a DSAKeyPairGenerator
49 * and calling one of the
50 * {@code initialize} methods from this DSAKeyPairGenerator interface.
51 *
52 * <li>Generate a key pair by calling the {@code generateKeyPair}
53 * method from the KeyPairGenerator class.
54 *
55 * </ol>
56 *
57 * <p>Note: it is not always necessary to do algorithm-specific
58 * initialization for a DSA key pair generator. That is, it is not always
59 * necessary to call an {@code initialize} method in this interface.
60 * Algorithm-independent initialization using the {@code initialize} method
61 * in the KeyPairGenerator
62 * interface is all that is needed when you accept defaults for algorithm-specific
63 * parameters.
64 *
65 * <p>Note: Some earlier implementations of this interface may not support
66 * larger sizes of DSA parameters such as 2048 and 3072-bit.
67 *
68 * @see java.security.KeyPairGenerator
69 */
70 public interface DSAKeyPairGenerator {
71
72 /**
73 * Initializes the key pair generator using the DSA family parameters
74 * (p,q and g) and an optional SecureRandom bit source. If a
75 * SecureRandom bit source is needed but not supplied, i.e. null, a
76 * default SecureRandom instance will be used.
77 *
78 * @param params the parameters to use to generate the keys.
79 *
80 * @param random the random bit source to use to generate key bits;
81 * can be null.
82 *
83 * @exception InvalidParameterException if the {@code params}
84 * value is invalid, null, or unsupported.
85 */
86 public void initialize(DSAParams params, SecureRandom random)
87 throws InvalidParameterException;
|
48 * <li>Initialize the generator by casting the result to a DSAKeyPairGenerator
49 * and calling one of the
50 * {@code initialize} methods from this DSAKeyPairGenerator interface.
51 *
52 * <li>Generate a key pair by calling the {@code generateKeyPair}
53 * method from the KeyPairGenerator class.
54 *
55 * </ol>
56 *
57 * <p>Note: it is not always necessary to do algorithm-specific
58 * initialization for a DSA key pair generator. That is, it is not always
59 * necessary to call an {@code initialize} method in this interface.
60 * Algorithm-independent initialization using the {@code initialize} method
61 * in the KeyPairGenerator
62 * interface is all that is needed when you accept defaults for algorithm-specific
63 * parameters.
64 *
65 * <p>Note: Some earlier implementations of this interface may not support
66 * larger sizes of DSA parameters such as 2048 and 3072-bit.
67 *
68 * @since 1.1
69 * @see java.security.KeyPairGenerator
70 */
71 public interface DSAKeyPairGenerator {
72
73 /**
74 * Initializes the key pair generator using the DSA family parameters
75 * (p,q and g) and an optional SecureRandom bit source. If a
76 * SecureRandom bit source is needed but not supplied, i.e. null, a
77 * default SecureRandom instance will be used.
78 *
79 * @param params the parameters to use to generate the keys.
80 *
81 * @param random the random bit source to use to generate key bits;
82 * can be null.
83 *
84 * @exception InvalidParameterException if the {@code params}
85 * value is invalid, null, or unsupported.
86 */
87 public void initialize(DSAParams params, SecureRandom random)
88 throws InvalidParameterException;
|