equal
deleted
inserted
replaced
1 /* |
1 /* |
2 * Copyright (c) 2003, 2012, Oracle and/or its affiliates. All rights reserved. |
2 * Copyright (c) 2003, 2018, 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. |
7 * published by the Free Software Foundation. |
21 * questions. |
21 * questions. |
22 */ |
22 */ |
23 |
23 |
24 /* |
24 /* |
25 * @test |
25 * @test |
26 * @bug 4923484 |
26 * @bug 4923484 8146293 |
27 * @summary encryption/decryption test for using OAEPParameterSpec. |
27 * @summary encryption/decryption test for using OAEPParameterSpec. |
28 * @author Valerie Peng |
28 * @author Valerie Peng |
29 */ |
29 */ |
30 |
30 |
31 import java.util.*; |
31 import java.util.*; |
45 private static PublicKey publicKey; |
45 private static PublicKey publicKey; |
46 |
46 |
47 private static Random random = new Random(); |
47 private static Random random = new Random(); |
48 |
48 |
49 private static String MD[] = { |
49 private static String MD[] = { |
50 "MD5", "SHA1", "SHA-224", "SHA-256" |
50 "MD5", "SHA1", "SHA-224", "SHA-256", "SHA-512/224", "SHA-512/256" |
51 }; |
51 }; |
52 private static int DATA_LENGTH[] = { |
52 private static int DATA_LENGTH[] = { |
53 62, 54, 34, 30 |
53 62, 54, 34, 30, 34, 30 |
54 }; |
54 }; |
55 public static void main(String[] args) throws Exception { |
55 public static void main(String[] args) throws Exception { |
56 long start = System.currentTimeMillis(); |
56 long start = System.currentTimeMillis(); |
57 cp = Security.getProvider("SunJCE"); |
57 cp = Security.getProvider("SunJCE"); |
58 System.out.println("Testing provider " + cp.getName() + "..."); |
58 System.out.println("Testing provider " + cp.getName() + "..."); |