7 * published by the Free Software Foundation.
8 *
9 * This code is distributed in the hope that it will be useful, but WITHOUT
10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
12 * version 2 for more details (a copy is included in the LICENSE file that
13 * accompanied this code).
14 *
15 * You should have received a copy of the GNU General Public License version
16 * 2 along with this work; if not, write to the Free Software Foundation,
17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
18 *
19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
20 * or visit www.oracle.com if you need additional information or have any
21 * questions.
22 */
23
24 /* @test
25 * @bug 8051408 8158534
26 * @summary Make sure DrbgParameters coded as specified
27 * @library /test/lib/share/classes
28 */
29
30 import jdk.test.lib.Asserts;
31
32 import java.security.DrbgParameters;
33 import java.util.Arrays;
34
35 import static java.security.DrbgParameters.Capability.*;
36
37 public class DrbgParametersSpec {
38
39 public static void main(String args[]) throws Exception {
40
41 byte[] p, np1, np2;
42
43 // Capability
44 Asserts.assertTrue(PR_AND_RESEED.supportsPredictionResistance());
45 Asserts.assertTrue(PR_AND_RESEED.supportsReseeding());
46 Asserts.assertFalse(RESEED_ONLY.supportsPredictionResistance());
47 Asserts.assertTrue(RESEED_ONLY.supportsReseeding());
|
7 * published by the Free Software Foundation.
8 *
9 * This code is distributed in the hope that it will be useful, but WITHOUT
10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
12 * version 2 for more details (a copy is included in the LICENSE file that
13 * accompanied this code).
14 *
15 * You should have received a copy of the GNU General Public License version
16 * 2 along with this work; if not, write to the Free Software Foundation,
17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
18 *
19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
20 * or visit www.oracle.com if you need additional information or have any
21 * questions.
22 */
23
24 /* @test
25 * @bug 8051408 8158534
26 * @summary Make sure DrbgParameters coded as specified
27 * @library /test/lib
28 */
29
30 import jdk.test.lib.Asserts;
31
32 import java.security.DrbgParameters;
33 import java.util.Arrays;
34
35 import static java.security.DrbgParameters.Capability.*;
36
37 public class DrbgParametersSpec {
38
39 public static void main(String args[]) throws Exception {
40
41 byte[] p, np1, np2;
42
43 // Capability
44 Asserts.assertTrue(PR_AND_RESEED.supportsPredictionResistance());
45 Asserts.assertTrue(PR_AND_RESEED.supportsReseeding());
46 Asserts.assertFalse(RESEED_ONLY.supportsPredictionResistance());
47 Asserts.assertTrue(RESEED_ONLY.supportsReseeding());
|