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 import java.io.PrintStream;
25 import java.lang.String;
26 import java.lang.System;
27 import java.security.Provider;
28 import java.security.SecureRandom;
29 import java.security.Security;
30 import javax.crypto.KeyGenerator;
31 import static java.lang.System.out;
32
33 /*
34 * @test
35 * @bug 8048607
36 * @compile ../../../com/sun/crypto/provider/Cipher/DES/TestUtility.java
37 * @summary Test key generation of DES and DESEDE
38 */
39 public class TestKGParity {
40
41 private static final String[] ALGORITHM_ARR = {
42 "deS", "DesEDE"
43 };
44
45 public static void main(String argv[]) throws Exception {
46
47 TestKGParity test = new TestKGParity();
48 test.run();
49 }
50
51 private void run() throws Exception {
52 Provider[] providers = Security.getProviders();
53 for (Provider p : providers) {
54 String prvName = p.getName();
55 if (prvName.startsWith("SunJCE")
56 || prvName.startsWith("SunPKCS11-")) {
57 for (String algorithm : ALGORITHM_ARR) {
|
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 import java.io.PrintStream;
25 import java.lang.String;
26 import java.lang.System;
27 import java.security.Provider;
28 import java.security.SecureRandom;
29 import java.security.Security;
30 import javax.crypto.KeyGenerator;
31 import static java.lang.System.out;
32
33 /*
34 * @test
35 * @bug 8048607
36 * @compile ../../../com/sun/crypto/provider/Cipher/DES/TestUtility.java
37 * @summary Test key generation of DES and DESEDE
38 * @key randomness
39 */
40 public class TestKGParity {
41
42 private static final String[] ALGORITHM_ARR = {
43 "deS", "DesEDE"
44 };
45
46 public static void main(String argv[]) throws Exception {
47
48 TestKGParity test = new TestKGParity();
49 test.run();
50 }
51
52 private void run() throws Exception {
53 Provider[] providers = Security.getProviders();
54 for (Provider p : providers) {
55 String prvName = p.getName();
56 if (prvName.startsWith("SunJCE")
57 || prvName.startsWith("SunPKCS11-")) {
58 for (String algorithm : ALGORITHM_ARR) {
|