98 // lazy initialize SecureRandom to avoid potential recursion if Sun
99 // provider has not been installed yet
100 private static class SecureRandomHolder {
101 static final SecureRandom RANDOM = new SecureRandom();
102 }
103 static SecureRandom getRandom() { return SecureRandomHolder.RANDOM; }
104
105 public SunJCE() {
106 /* We are the "SunJCE" provider */
107 super("SunJCE", 1.9d, info);
108
109 final String BLOCK_MODES = "ECB|CBC|PCBC|CTR|CTS|CFB|OFB" +
110 "|CFB8|CFB16|CFB24|CFB32|CFB40|CFB48|CFB56|CFB64" +
111 "|OFB8|OFB16|OFB24|OFB32|OFB40|OFB48|OFB56|OFB64";
112 final String BLOCK_MODES128 = BLOCK_MODES +
113 "|GCM|CFB72|CFB80|CFB88|CFB96|CFB104|CFB112|CFB120|CFB128" +
114 "|OFB72|OFB80|OFB88|OFB96|OFB104|OFB112|OFB120|OFB128";
115 final String BLOCK_PADS = "NOPADDING|PKCS5PADDING|ISO10126PADDING";
116
117 AccessController.doPrivileged(
118 new java.security.PrivilegedAction<Object>() {
119 public Object run() {
120
121 /*
122 * Cipher engines
123 */
124 put("Cipher.RSA", "com.sun.crypto.provider.RSACipher");
125 put("Cipher.RSA SupportedModes", "ECB");
126 put("Cipher.RSA SupportedPaddings",
127 "NOPADDING|PKCS1PADDING|OAEPPADDING"
128 + "|OAEPWITHMD5ANDMGF1PADDING"
129 + "|OAEPWITHSHA1ANDMGF1PADDING"
130 + "|OAEPWITHSHA-1ANDMGF1PADDING"
131 + "|OAEPWITHSHA-224ANDMGF1PADDING"
132 + "|OAEPWITHSHA-256ANDMGF1PADDING"
133 + "|OAEPWITHSHA-384ANDMGF1PADDING"
134 + "|OAEPWITHSHA-512ANDMGF1PADDING");
135 put("Cipher.RSA SupportedKeyClasses",
136 "java.security.interfaces.RSAPublicKey" +
137 "|java.security.interfaces.RSAPrivateKey");
138
|
98 // lazy initialize SecureRandom to avoid potential recursion if Sun
99 // provider has not been installed yet
100 private static class SecureRandomHolder {
101 static final SecureRandom RANDOM = new SecureRandom();
102 }
103 static SecureRandom getRandom() { return SecureRandomHolder.RANDOM; }
104
105 public SunJCE() {
106 /* We are the "SunJCE" provider */
107 super("SunJCE", 1.9d, info);
108
109 final String BLOCK_MODES = "ECB|CBC|PCBC|CTR|CTS|CFB|OFB" +
110 "|CFB8|CFB16|CFB24|CFB32|CFB40|CFB48|CFB56|CFB64" +
111 "|OFB8|OFB16|OFB24|OFB32|OFB40|OFB48|OFB56|OFB64";
112 final String BLOCK_MODES128 = BLOCK_MODES +
113 "|GCM|CFB72|CFB80|CFB88|CFB96|CFB104|CFB112|CFB120|CFB128" +
114 "|OFB72|OFB80|OFB88|OFB96|OFB104|OFB112|OFB120|OFB128";
115 final String BLOCK_PADS = "NOPADDING|PKCS5PADDING|ISO10126PADDING";
116
117 AccessController.doPrivileged(
118 new java.security.PrivilegedAction<>() {
119 public Object run() {
120
121 /*
122 * Cipher engines
123 */
124 put("Cipher.RSA", "com.sun.crypto.provider.RSACipher");
125 put("Cipher.RSA SupportedModes", "ECB");
126 put("Cipher.RSA SupportedPaddings",
127 "NOPADDING|PKCS1PADDING|OAEPPADDING"
128 + "|OAEPWITHMD5ANDMGF1PADDING"
129 + "|OAEPWITHSHA1ANDMGF1PADDING"
130 + "|OAEPWITHSHA-1ANDMGF1PADDING"
131 + "|OAEPWITHSHA-224ANDMGF1PADDING"
132 + "|OAEPWITHSHA-256ANDMGF1PADDING"
133 + "|OAEPWITHSHA-384ANDMGF1PADDING"
134 + "|OAEPWITHSHA-512ANDMGF1PADDING");
135 put("Cipher.RSA SupportedKeyClasses",
136 "java.security.interfaces.RSAPublicKey" +
137 "|java.security.interfaces.RSAPrivateKey");
138
|