src/java.base/share/classes/java/security/AlgorithmParameterGenerator.java
changeset 58242 94bb65cb37d3
parent 53018 8bf9268df0e2
equal deleted inserted replaced
58241:33de7752835c 58242:94bb65cb37d3
     1 /*
     1 /*
     2  * Copyright (c) 1997, 2017, Oracle and/or its affiliates. All rights reserved.
     2  * Copyright (c) 1997, 2019, Oracle and/or its affiliates. All rights reserved.
     3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     4  *
     4  *
     5  * This code is free software; you can redistribute it and/or modify it
     5  * This code is free software; you can redistribute it and/or modify it
     6  * under the terms of the GNU General Public License version 2 only, as
     6  * under the terms of the GNU General Public License version 2 only, as
     7  * published by the Free Software Foundation.  Oracle designates this
     7  * published by the Free Software Foundation.  Oracle designates this
   332      * {@code SecureRandom}, a system-provided source of randomness is
   332      * {@code SecureRandom}, a system-provided source of randomness is
   333      * used.)
   333      * used.)
   334      *
   334      *
   335      * @param genParamSpec the set of algorithm-specific parameter generation values.
   335      * @param genParamSpec the set of algorithm-specific parameter generation values.
   336      *
   336      *
   337      * @exception InvalidAlgorithmParameterException if the given parameter
   337      * @throws    InvalidAlgorithmParameterException if the given parameter
   338      * generation values are inappropriate for this parameter generator.
   338      * generation values are inappropriate for this parameter generator.
   339      */
   339      */
   340     public final void init(AlgorithmParameterSpec genParamSpec)
   340     public final void init(AlgorithmParameterSpec genParamSpec)
   341         throws InvalidAlgorithmParameterException {
   341         throws InvalidAlgorithmParameterException {
   342             paramGenSpi.engineInit(genParamSpec, new SecureRandom());
   342             paramGenSpi.engineInit(genParamSpec, new SecureRandom());
   347      * parameter generation values.
   347      * parameter generation values.
   348      *
   348      *
   349      * @param genParamSpec the set of algorithm-specific parameter generation values.
   349      * @param genParamSpec the set of algorithm-specific parameter generation values.
   350      * @param random the source of randomness.
   350      * @param random the source of randomness.
   351      *
   351      *
   352      * @exception InvalidAlgorithmParameterException if the given parameter
   352      * @throws    InvalidAlgorithmParameterException if the given parameter
   353      * generation values are inappropriate for this parameter generator.
   353      * generation values are inappropriate for this parameter generator.
   354      */
   354      */
   355     public final void init(AlgorithmParameterSpec genParamSpec,
   355     public final void init(AlgorithmParameterSpec genParamSpec,
   356                            SecureRandom random)
   356                            SecureRandom random)
   357         throws InvalidAlgorithmParameterException {
   357         throws InvalidAlgorithmParameterException {