< prev index next >

src/java.base/share/classes/com/sun/crypto/provider/SunJCE.java

Print this page


   1 /*
   2  * Copyright (c) 1997, 2017, Oracle and/or its affiliates. All rights reserved.
   3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
   4  *
   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
   7  * published by the Free Software Foundation.  Oracle designates this
   8  * particular file as subject to the "Classpath" exception as provided
   9  * by Oracle in the LICENSE file that accompanied this code.
  10  *
  11  * This code is distributed in the hope that it will be useful, but WITHOUT
  12  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  13  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  14  * version 2 for more details (a copy is included in the LICENSE file that
  15  * accompanied this code).
  16  *
  17  * You should have received a copy of the GNU General Public License version
  18  * 2 along with this work; if not, write to the Free Software Foundation,
  19  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  20  *
  21  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  22  * or visit www.oracle.com if you need additional information or have any


 115             "|OFB72|OFB80|OFB88|OFB96|OFB104|OFB112|OFB120|OFB128";
 116         final String BLOCK_PADS = "NOPADDING|PKCS5PADDING|ISO10126PADDING";
 117 
 118         AccessController.doPrivileged(
 119             new java.security.PrivilegedAction<>() {
 120                 public Object run() {
 121 
 122                     /*
 123                      * Cipher engines
 124                      */
 125                     put("Cipher.RSA", "com.sun.crypto.provider.RSACipher");
 126                     put("Cipher.RSA SupportedModes", "ECB");
 127                     put("Cipher.RSA SupportedPaddings",
 128                             "NOPADDING|PKCS1PADDING|OAEPPADDING"
 129                             + "|OAEPWITHMD5ANDMGF1PADDING"
 130                             + "|OAEPWITHSHA1ANDMGF1PADDING"
 131                             + "|OAEPWITHSHA-1ANDMGF1PADDING"
 132                             + "|OAEPWITHSHA-224ANDMGF1PADDING"
 133                             + "|OAEPWITHSHA-256ANDMGF1PADDING"
 134                             + "|OAEPWITHSHA-384ANDMGF1PADDING"
 135                             + "|OAEPWITHSHA-512ANDMGF1PADDING");


 136                     put("Cipher.RSA SupportedKeyClasses",
 137                             "java.security.interfaces.RSAPublicKey" +
 138                             "|java.security.interfaces.RSAPrivateKey");
 139 
 140                     put("Cipher.DES", "com.sun.crypto.provider.DESCipher");
 141                     put("Cipher.DES SupportedModes", BLOCK_MODES);
 142                     put("Cipher.DES SupportedPaddings", BLOCK_PADS);
 143                     put("Cipher.DES SupportedKeyFormats", "RAW");
 144 
 145                     put("Cipher.DESede", "com.sun.crypto.provider.DESedeCipher");
 146                     put("Alg.Alias.Cipher.TripleDES", "DESede");
 147                     put("Cipher.DESede SupportedModes", BLOCK_MODES);
 148                     put("Cipher.DESede SupportedPaddings", BLOCK_PADS);
 149                     put("Cipher.DESede SupportedKeyFormats", "RAW");
 150 
 151                     put("Cipher.DESedeWrap",
 152                         "com.sun.crypto.provider.DESedeWrapCipher");
 153                     put("Cipher.DESedeWrap SupportedModes", "CBC");
 154                     put("Cipher.DESedeWrap SupportedPaddings", "NOPADDING");
 155                     put("Cipher.DESedeWrap SupportedKeyFormats", "RAW");


   1 /*
   2  * Copyright (c) 1997, 2018, Oracle and/or its affiliates. All rights reserved.
   3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
   4  *
   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
   7  * published by the Free Software Foundation.  Oracle designates this
   8  * particular file as subject to the "Classpath" exception as provided
   9  * by Oracle in the LICENSE file that accompanied this code.
  10  *
  11  * This code is distributed in the hope that it will be useful, but WITHOUT
  12  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  13  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  14  * version 2 for more details (a copy is included in the LICENSE file that
  15  * accompanied this code).
  16  *
  17  * You should have received a copy of the GNU General Public License version
  18  * 2 along with this work; if not, write to the Free Software Foundation,
  19  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  20  *
  21  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  22  * or visit www.oracle.com if you need additional information or have any


 115             "|OFB72|OFB80|OFB88|OFB96|OFB104|OFB112|OFB120|OFB128";
 116         final String BLOCK_PADS = "NOPADDING|PKCS5PADDING|ISO10126PADDING";
 117 
 118         AccessController.doPrivileged(
 119             new java.security.PrivilegedAction<>() {
 120                 public Object run() {
 121 
 122                     /*
 123                      * Cipher engines
 124                      */
 125                     put("Cipher.RSA", "com.sun.crypto.provider.RSACipher");
 126                     put("Cipher.RSA SupportedModes", "ECB");
 127                     put("Cipher.RSA SupportedPaddings",
 128                             "NOPADDING|PKCS1PADDING|OAEPPADDING"
 129                             + "|OAEPWITHMD5ANDMGF1PADDING"
 130                             + "|OAEPWITHSHA1ANDMGF1PADDING"
 131                             + "|OAEPWITHSHA-1ANDMGF1PADDING"
 132                             + "|OAEPWITHSHA-224ANDMGF1PADDING"
 133                             + "|OAEPWITHSHA-256ANDMGF1PADDING"
 134                             + "|OAEPWITHSHA-384ANDMGF1PADDING"
 135                             + "|OAEPWITHSHA-512ANDMGF1PADDING"
 136                             + "|OAEPWITHSHA-512/224ANDMGF1PADDING"
 137                             + "|OAEPWITHSHA-512/256ANDMGF1PADDING");
 138                     put("Cipher.RSA SupportedKeyClasses",
 139                             "java.security.interfaces.RSAPublicKey" +
 140                             "|java.security.interfaces.RSAPrivateKey");
 141 
 142                     put("Cipher.DES", "com.sun.crypto.provider.DESCipher");
 143                     put("Cipher.DES SupportedModes", BLOCK_MODES);
 144                     put("Cipher.DES SupportedPaddings", BLOCK_PADS);
 145                     put("Cipher.DES SupportedKeyFormats", "RAW");
 146 
 147                     put("Cipher.DESede", "com.sun.crypto.provider.DESedeCipher");
 148                     put("Alg.Alias.Cipher.TripleDES", "DESede");
 149                     put("Cipher.DESede SupportedModes", BLOCK_MODES);
 150                     put("Cipher.DESede SupportedPaddings", BLOCK_PADS);
 151                     put("Cipher.DESede SupportedKeyFormats", "RAW");
 152 
 153                     put("Cipher.DESedeWrap",
 154                         "com.sun.crypto.provider.DESedeWrapCipher");
 155                     put("Cipher.DESedeWrap SupportedModes", "CBC");
 156                     put("Cipher.DESedeWrap SupportedPaddings", "NOPADDING");
 157                     put("Cipher.DESedeWrap SupportedKeyFormats", "RAW");


< prev index next >