Source Code Cross Referenced for BouncyCastleProvider.java in  » Security » Bouncy-Castle » org » bouncycastle » jce » provider » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » Security » Bouncy Castle » org.bouncycastle.jce.provider 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


0001:        package org.bouncycastle.jce.provider;
0002:
0003:        import org.bouncycastle.asn1.DERObjectIdentifier;
0004:        import org.bouncycastle.asn1.cryptopro.CryptoProObjectIdentifiers;
0005:        import org.bouncycastle.asn1.iana.IANAObjectIdentifiers;
0006:        import org.bouncycastle.asn1.nist.NISTObjectIdentifiers;
0007:        import org.bouncycastle.asn1.oiw.OIWObjectIdentifiers;
0008:        import org.bouncycastle.asn1.pkcs.PKCSObjectIdentifiers;
0009:        import org.bouncycastle.asn1.teletrust.TeleTrusTObjectIdentifiers;
0010:        import org.bouncycastle.asn1.x9.X9ObjectIdentifiers;
0011:        import org.bouncycastle.jce.interfaces.ConfigurableProvider;
0012:        import org.bouncycastle.jce.provider.symmetric.AESMappings;
0013:        import org.bouncycastle.jce.provider.symmetric.CAST5Mappings;
0014:        import org.bouncycastle.jce.provider.symmetric.CamelliaMappings;
0015:        import org.bouncycastle.jce.provider.symmetric.NoekeonMappings;
0016:        import org.bouncycastle.jce.provider.symmetric.SEEDMappings;
0017:
0018:        import java.security.Provider;
0019:        import java.util.Iterator;
0020:        import java.util.Map;
0021:
0022:        /**
0023:         * To add the provider at runtime use:
0024:         * <pre>
0025:         * import java.security.Security;
0026:         * import org.bouncycastle.jce.provider.BouncyCastleProvider;
0027:         *
0028:         * Security.addProvider(new BouncyCastleProvider());
0029:         * </pre>
0030:         * The provider can also be configured as part of your environment via
0031:         * static registration by adding an entry to the java.security properties
0032:         * file (found in $JAVA_HOME/jre/lib/security/java.security, where
0033:         * $JAVA_HOME is the location of your JDK/JRE distribution). You'll find
0034:         * detailed instructions in the file but basically it comes down to adding
0035:         * a line:
0036:         * <pre>
0037:         * <code>
0038:         *    security.provider.&lt;n&gt;=org.bouncycastle.jce.provider.BouncyCastleProvider
0039:         * </code>
0040:         * </pre>
0041:         * Where &lt;n&gt; is the preference you want the provider at (1 being the
0042:         * most prefered).
0043:         * <p>Note: JCE algorithm names should be uppercase only so the case insensitive
0044:         * test for getInstance works.
0045:         */
0046:        public final class BouncyCastleProvider extends Provider implements 
0047:                ConfigurableProvider {
0048:            private static String info = "BouncyCastle Security Provider v1.38";
0049:
0050:            public static String PROVIDER_NAME = "BC";
0051:
0052:            /**
0053:             * Construct a new provider.  This should only be required when
0054:             * using runtime registration of the provider using the
0055:             * <code>Security.addProvider()</code> mechanism.
0056:             */
0057:            public BouncyCastleProvider() {
0058:                super (PROVIDER_NAME, 1.38, info);
0059:
0060:                addMappings(new AESMappings());
0061:                addMappings(new CamelliaMappings());
0062:                addMappings(new CAST5Mappings());
0063:                addMappings(new SEEDMappings());
0064:                addMappings(new NoekeonMappings());
0065:
0066:                //
0067:                // X509Store
0068:                //
0069:                put("X509Store.CERTIFICATE/COLLECTION",
0070:                        "org.bouncycastle.jce.provider.X509StoreCertCollection");
0071:                put("X509Store.ATTRIBUTECERTIFICATE/COLLECTION",
0072:                        "org.bouncycastle.jce.provider.X509StoreAttrCertCollection");
0073:                put("X509Store.CRL/COLLECTION",
0074:                        "org.bouncycastle.jce.provider.X509StoreCRLCollection");
0075:                put("X509Store.CERTIFICATEPAIR/COLLECTION",
0076:                        "org.bouncycastle.jce.provider.X509StoreCertPairCollection");
0077:
0078:                put("X509Store.CERTIFICATE/LDAP",
0079:                        "org.bouncycastle.jce.provider.X509StoreLDAPCerts");
0080:                put("X509Store.CRL/LDAP",
0081:                        "org.bouncycastle.jce.provider.X509StoreLDAPCRLs");
0082:                put("X509Store.ATTRIBUTECERTIFICATE/LDAP",
0083:                        "org.bouncycastle.jce.provider.X509StoreLDAPAttrCerts");
0084:                put("X509Store.CERTIFICATEPAIR/LDAP",
0085:                        "org.bouncycastle.jce.provider.X509StoreLDAPCertPairs");
0086:
0087:                //
0088:                // X509StreamParser
0089:                //
0090:                put("X509StreamParser.CERTIFICATE",
0091:                        "org.bouncycastle.jce.provider.X509CertParser");
0092:                put("X509StreamParser.ATTRIBUTECERTIFICATE",
0093:                        "org.bouncycastle.jce.provider.X509AttrCertParser");
0094:                put("X509StreamParser.CRL",
0095:                        "org.bouncycastle.jce.provider.X509CRLParser");
0096:                put("X509StreamParser.CERTIFICATEPAIR",
0097:                        "org.bouncycastle.jce.provider.X509CertPairParser");
0098:
0099:                //
0100:                // KeyStore
0101:                //
0102:                put("KeyStore.BKS", "org.bouncycastle.jce.provider.JDKKeyStore");
0103:                put("KeyStore.BouncyCastle",
0104:                        "org.bouncycastle.jce.provider.JDKKeyStore$BouncyCastleStore");
0105:                put("KeyStore.PKCS12",
0106:                        "org.bouncycastle.jce.provider.JDKPKCS12KeyStore$BCPKCS12KeyStore");
0107:                put("KeyStore.BCPKCS12",
0108:                        "org.bouncycastle.jce.provider.JDKPKCS12KeyStore$BCPKCS12KeyStore");
0109:                put("KeyStore.PKCS12-DEF",
0110:                        "org.bouncycastle.jce.provider.JDKPKCS12KeyStore$DefPKCS12KeyStore");
0111:                put("Alg.Alias.KeyStore.UBER", "BouncyCastle");
0112:                put("Alg.Alias.KeyStore.BOUNCYCASTLE", "BouncyCastle");
0113:                put("Alg.Alias.KeyStore.bouncycastle", "BouncyCastle");
0114:
0115:                //
0116:                // certificate factories.
0117:                //
0118:                put("CertificateFactory.X.509",
0119:                        "org.bouncycastle.jce.provider.JDKX509CertificateFactory");
0120:                put("Alg.Alias.CertificateFactory.X509", "X.509");
0121:
0122:                //
0123:                // algorithm parameter generators
0124:                //
0125:                put("AlgorithmParameterGenerator.DH",
0126:                        "org.bouncycastle.jce.provider.JDKAlgorithmParameterGenerator$DH");
0127:                put("AlgorithmParameterGenerator.DSA",
0128:                        "org.bouncycastle.jce.provider.JDKAlgorithmParameterGenerator$DSA");
0129:                put("AlgorithmParameterGenerator.GOST3410",
0130:                        "org.bouncycastle.jce.provider.JDKAlgorithmParameterGenerator$GOST3410");
0131:                put("AlgorithmParameterGenerator.ELGAMAL",
0132:                        "org.bouncycastle.jce.provider.JDKAlgorithmParameterGenerator$ElGamal");
0133:                put("AlgorithmParameterGenerator.DES",
0134:                        "org.bouncycastle.jce.provider.JDKAlgorithmParameterGenerator$DES");
0135:                put("AlgorithmParameterGenerator.DESEDE",
0136:                        "org.bouncycastle.jce.provider.JDKAlgorithmParameterGenerator$DES");
0137:                put("AlgorithmParameterGenerator.1.2.840.113549.3.7",
0138:                        "org.bouncycastle.jce.provider.JDKAlgorithmParameterGenerator$DES");
0139:                put("AlgorithmParameterGenerator.1.3.14.3.2.7",
0140:                        "org.bouncycastle.jce.provider.JDKAlgorithmParameterGenerator$DES");
0141:                put("AlgorithmParameterGenerator.IDEA",
0142:                        "org.bouncycastle.jce.provider.JDKAlgorithmParameterGenerator$IDEA");
0143:                put("AlgorithmParameterGenerator.1.3.6.1.4.1.188.7.1.1.2",
0144:                        "org.bouncycastle.jce.provider.JDKAlgorithmParameterGenerator$IDEA");
0145:                put("AlgorithmParameterGenerator.RC2",
0146:                        "org.bouncycastle.jce.provider.JDKAlgorithmParameterGenerator$RC2");
0147:                put("AlgorithmParameterGenerator.1.2.840.113549.3.2",
0148:                        "org.bouncycastle.jce.provider.JDKAlgorithmParameterGenerator$RC2");
0149:
0150:                put("Alg.Alias.AlgorithmParameterGenerator.GOST-3410",
0151:                        "GOST3410");
0152:                //
0153:                // algorithm parameters
0154:                //
0155:                put("AlgorithmParameters.OAEP",
0156:                        "org.bouncycastle.jce.provider.JDKAlgorithmParameters$OAEP");
0157:                put("AlgorithmParameters.PSS",
0158:                        "org.bouncycastle.jce.provider.JDKAlgorithmParameters$PSS");
0159:                put("AlgorithmParameters.DH",
0160:                        "org.bouncycastle.jce.provider.JDKAlgorithmParameters$DH");
0161:                put("AlgorithmParameters.DSA",
0162:                        "org.bouncycastle.jce.provider.JDKAlgorithmParameters$DSA");
0163:                put("AlgorithmParameters.ELGAMAL",
0164:                        "org.bouncycastle.jce.provider.JDKAlgorithmParameters$ElGamal");
0165:                put("AlgorithmParameters.IES",
0166:                        "org.bouncycastle.jce.provider.JDKAlgorithmParameters$IES");
0167:                put("AlgorithmParameters.PKCS12PBE",
0168:                        "org.bouncycastle.jce.provider.JDKAlgorithmParameters$PKCS12PBE");
0169:                put("AlgorithmParameters.1.2.840.113549.3.7",
0170:                        "org.bouncycastle.jce.provider.JDKAlgorithmParameters$IVAlgorithmParameters");
0171:                put("AlgorithmParameters.IDEA",
0172:                        "org.bouncycastle.jce.provider.JDKAlgorithmParameters$IDEAAlgorithmParameters");
0173:                put("AlgorithmParameters.1.3.6.1.4.1.188.7.1.1.2",
0174:                        "org.bouncycastle.jce.provider.JDKAlgorithmParameters$IDEAAlgorithmParameters");
0175:
0176:                put("AlgorithmParameters.GOST3410",
0177:                        "org.bouncycastle.jce.provider.JDKAlgorithmParameters$GOST3410");
0178:                put("Alg.Alias.AlgorithmParameters.GOST-3410", "GOST3410");
0179:                put("Alg.Alias.AlgorithmParameters.PBEWITHSHA1ANDRC2",
0180:                        "PKCS12PBE");
0181:                put(
0182:                        "Alg.Alias.AlgorithmParameters.PBEWITHSHAAND3-KEYTRIPLEDES",
0183:                        "PKCS12PBE");
0184:                put(
0185:                        "Alg.Alias.AlgorithmParameters.PBEWITHSHAAND2-KEYTRIPLEDES",
0186:                        "PKCS12PBE");
0187:                put("Alg.Alias.AlgorithmParameters.PBEWITHSHAANDRC2",
0188:                        "PKCS12PBE");
0189:                put("Alg.Alias.AlgorithmParameters.PBEWITHSHAANDRC4",
0190:                        "PKCS12PBE");
0191:                put("Alg.Alias.AlgorithmParameters.PBEWITHSHAANDTWOFISH",
0192:                        "PKCS12PBE");
0193:                put("Alg.Alias.AlgorithmParameters.PBEWITHSHAANDIDEA",
0194:                        "PKCS12PBE");
0195:                put("Alg.Alias.AlgorithmParameters.PBEWITHSHA1ANDRC2-CBC",
0196:                        "PKCS12PBE");
0197:                put(
0198:                        "Alg.Alias.AlgorithmParameters.PBEWITHSHAAND3-KEYTRIPLEDES-CBC",
0199:                        "PKCS12PBE");
0200:                put(
0201:                        "Alg.Alias.AlgorithmParameters.PBEWITHSHAAND2-KEYTRIPLEDES-CBC",
0202:                        "PKCS12PBE");
0203:                put("Alg.Alias.AlgorithmParameters.PBEWITHSHAANDDES3KEY-CBC",
0204:                        "PKCS12PBE");
0205:                put("Alg.Alias.AlgorithmParameters.PBEWITHSHAANDDES2KEY-CBC",
0206:                        "PKCS12PBE");
0207:                put("Alg.Alias.AlgorithmParameters.PBEWITHSHAAND40BITRC2-CBC",
0208:                        "PKCS12PBE");
0209:                put("Alg.Alias.AlgorithmParameters.PBEWITHSHAAND40BITRC4",
0210:                        "PKCS12PBE");
0211:                put("Alg.Alias.AlgorithmParameters.PBEWITHSHAAND128BITRC2-CBC",
0212:                        "PKCS12PBE");
0213:                put("Alg.Alias.AlgorithmParameters.PBEWITHSHAAND128BITRC4",
0214:                        "PKCS12PBE");
0215:                put("Alg.Alias.AlgorithmParameters.PBEWITHSHAANDTWOFISH",
0216:                        "PKCS12PBE");
0217:                put("Alg.Alias.AlgorithmParameters.PBEWITHSHAANDIDEA",
0218:                        "PKCS12PBE");
0219:                put("Alg.Alias.AlgorithmParameters.PBEWITHSHAANDTWOFISH-CBC",
0220:                        "PKCS12PBE");
0221:                put("Alg.Alias.AlgorithmParameters.PBEWITHSHAANDIDEA-CBC",
0222:                        "PKCS12PBE");
0223:                put("Alg.Alias.AlgorithmParameters.1.2.840.113549.1.12.1.1",
0224:                        "PKCS12PBE");
0225:                put("Alg.Alias.AlgorithmParameters.1.2.840.113549.1.12.1.2",
0226:                        "PKCS12PBE");
0227:                put("Alg.Alias.AlgorithmParameters.1.2.840.113549.1.12.1.3",
0228:                        "PKCS12PBE");
0229:                put("Alg.Alias.AlgorithmParameters.1.2.840.113549.1.12.1.4",
0230:                        "PKCS12PBE");
0231:                put("Alg.Alias.AlgorithmParameters.1.2.840.113549.1.12.1.5",
0232:                        "PKCS12PBE");
0233:                put("Alg.Alias.AlgorithmParameters.1.2.840.113549.1.12.1.6",
0234:                        "PKCS12PBE");
0235:                put("Alg.Alias.AlgorithmParameters.PBEWithSHAAnd3KeyTripleDES",
0236:                        "PKCS12PBE");
0237:                put("Alg.Alias.AlgorithmParameters."
0238:                        + PKCSObjectIdentifiers.id_RSAES_OAEP, "OAEP");
0239:
0240:                put("Alg.Alias.AlgorithmParameters."
0241:                        + PKCSObjectIdentifiers.id_RSASSA_PSS, "PSS");
0242:                put("Alg.Alias.AlgorithmParameters.SHA1WITHRSAANDMGF1", "PSS");
0243:                put("Alg.Alias.AlgorithmParameters.SHA224WITHRSAANDMGF1", "PSS");
0244:                put("Alg.Alias.AlgorithmParameters.SHA256WITHRSAANDMGF1", "PSS");
0245:                put("Alg.Alias.AlgorithmParameters.SHA384WITHRSAANDMGF1", "PSS");
0246:                put("Alg.Alias.AlgorithmParameters.SHA512WITHRSAANDMGF1", "PSS");
0247:
0248:                put(
0249:                        "Alg.Alias.AlgorithmParameters.PBEWITHSHAAND128BITAES-CBC-BC",
0250:                        "PKCS12PBE");
0251:                put(
0252:                        "Alg.Alias.AlgorithmParameters.PBEWITHSHAAND192BITAES-CBC-BC",
0253:                        "PKCS12PBE");
0254:                put(
0255:                        "Alg.Alias.AlgorithmParameters.PBEWITHSHAAND256BITAES-CBC-BC",
0256:                        "PKCS12PBE");
0257:                put(
0258:                        "Alg.Alias.AlgorithmParameters.PBEWITHSHA256AND128BITAES-CBC-BC",
0259:                        "PKCS12PBE");
0260:                put(
0261:                        "Alg.Alias.AlgorithmParameters.PBEWITHSHA256AND192BITAES-CBC-BC",
0262:                        "PKCS12PBE");
0263:                put(
0264:                        "Alg.Alias.AlgorithmParameters.PBEWITHSHA256AND256BITAES-CBC-BC",
0265:                        "PKCS12PBE");
0266:                put(
0267:                        "Alg.Alias.AlgorithmParameters.PBEWITHSHA1AND128BITAES-CBC-BC",
0268:                        "PKCS12PBE");
0269:                put(
0270:                        "Alg.Alias.AlgorithmParameters.PBEWITHSHA1AND192BITAES-CBC-BC",
0271:                        "PKCS12PBE");
0272:                put(
0273:                        "Alg.Alias.AlgorithmParameters.PBEWITHSHA1AND256BITAES-CBC-BC",
0274:                        "PKCS12PBE");
0275:                put(
0276:                        "Alg.Alias.AlgorithmParameters.PBEWITHSHA-1AND128BITAES-CBC-BC",
0277:                        "PKCS12PBE");
0278:                put(
0279:                        "Alg.Alias.AlgorithmParameters.PBEWITHSHA-1AND192BITAES-CBC-BC",
0280:                        "PKCS12PBE");
0281:                put(
0282:                        "Alg.Alias.AlgorithmParameters.PBEWITHSHA-1AND256BITAES-CBC-BC",
0283:                        "PKCS12PBE");
0284:                put(
0285:                        "Alg.Alias.AlgorithmParameters.PBEWITHSHA-256AND128BITAES-CBC-BC",
0286:                        "PKCS12PBE");
0287:                put(
0288:                        "Alg.Alias.AlgorithmParameters.PBEWITHSHA-256AND192BITAES-CBC-BC",
0289:                        "PKCS12PBE");
0290:                put(
0291:                        "Alg.Alias.AlgorithmParameters.PBEWITHSHA-256AND256BITAES-CBC-BC",
0292:                        "PKCS12PBE");
0293:
0294:                put("AlgorithmParameters.SHA1WITHECDSA",
0295:                        "org.bouncycastle.jce.provider.JDKECDSAAlgParameters$SigAlgParameters");
0296:                put("AlgorithmParameters.SHA224WITHECDSA",
0297:                        "org.bouncycastle.jce.provider.JDKECDSAAlgParameters$SigAlgParameters");
0298:                put("AlgorithmParameters.SHA256WITHECDSA",
0299:                        "org.bouncycastle.jce.provider.JDKECDSAAlgParameters$SigAlgParameters");
0300:                put("AlgorithmParameters.SHA384WITHECDSA",
0301:                        "org.bouncycastle.jce.provider.JDKECDSAAlgParameters$SigAlgParameters");
0302:                put("AlgorithmParameters.SHA512WITHECDSA",
0303:                        "org.bouncycastle.jce.provider.JDKECDSAAlgParameters$SigAlgParameters");
0304:
0305:                //
0306:                // key agreement
0307:                //
0308:                put("KeyAgreement.DH",
0309:                        "org.bouncycastle.jce.provider.JCEDHKeyAgreement");
0310:                put("KeyAgreement.ECDH",
0311:                        "org.bouncycastle.jce.provider.JCEECDHKeyAgreement$DH");
0312:                put("KeyAgreement.ECDHC",
0313:                        "org.bouncycastle.jce.provider.JCEECDHKeyAgreement$DHC");
0314:                put(
0315:                        "KeyAgreement."
0316:                                + X9ObjectIdentifiers.dhSinglePass_stdDH_sha1kdf_scheme,
0317:                        "org.bouncycastle.jce.provider.JCEECDHKeyAgreement$DHwithSHA1KDF");
0318:
0319:                //
0320:                // cipher engines
0321:                //
0322:                put("Cipher.DES",
0323:                        "org.bouncycastle.jce.provider.JCEBlockCipher$DES");
0324:                put("Cipher.DESEDE",
0325:                        "org.bouncycastle.jce.provider.JCEBlockCipher$DESede");
0326:                put("Cipher.1.2.840.113549.3.7",
0327:                        "org.bouncycastle.jce.provider.JCEBlockCipher$DESedeCBC");
0328:                put("Cipher.1.3.14.3.2.7",
0329:                        "org.bouncycastle.jce.provider.JCEBlockCipher$DESCBC");
0330:                put("Cipher.DESEDEWRAP",
0331:                        "org.bouncycastle.jce.provider.WrapCipherSpi$DESEDEWrap");
0332:                put("Cipher.1.2.840.113549.1.9.16.3.6",
0333:                        "org.bouncycastle.jce.provider.WrapCipherSpi$DESEDEWrap");
0334:                put("Cipher.SKIPJACK",
0335:                        "org.bouncycastle.jce.provider.JCEBlockCipher$Skipjack");
0336:                put("Cipher.BLOWFISH",
0337:                        "org.bouncycastle.jce.provider.JCEBlockCipher$Blowfish");
0338:                put("Cipher.TWOFISH",
0339:                        "org.bouncycastle.jce.provider.JCEBlockCipher$Twofish");
0340:                put("Cipher.RC2",
0341:                        "org.bouncycastle.jce.provider.JCEBlockCipher$RC2");
0342:                put("Cipher.RC2WRAP",
0343:                        "org.bouncycastle.jce.provider.WrapCipherSpi$RC2Wrap");
0344:                put("Cipher.1.2.840.113549.1.9.16.3.7",
0345:                        "org.bouncycastle.jce.provider.WrapCipherSpi$RC2Wrap");
0346:                put("Cipher.ARC4",
0347:                        "org.bouncycastle.jce.provider.JCEStreamCipher$RC4");
0348:                put("Alg.Alias.Cipher.1.2.840.113549.3.4", "ARC4");
0349:                put("Alg.Alias.Cipher.ARCFOUR", "ARC4");
0350:                put("Alg.Alias.Cipher.RC4", "ARC4");
0351:                put("Cipher.SALSA20",
0352:                        "org.bouncycastle.jce.provider.JCEStreamCipher$Salsa20");
0353:                put("Cipher.HC128",
0354:                        "org.bouncycastle.jce.provider.JCEStreamCipher$HC128");
0355:                put("Cipher.HC256",
0356:                        "org.bouncycastle.jce.provider.JCEStreamCipher$HC256");
0357:                put("Cipher.VMPC",
0358:                        "org.bouncycastle.jce.provider.JCEStreamCipher$VMPC");
0359:                put("Cipher.VMPC-KSA3",
0360:                        "org.bouncycastle.jce.provider.JCEStreamCipher$VMPCKSA3");
0361:                put("Cipher.RC5",
0362:                        "org.bouncycastle.jce.provider.JCEBlockCipher$RC5");
0363:                put("Cipher.1.2.840.113549.3.2",
0364:                        "org.bouncycastle.jce.provider.JCEBlockCipher$RC2CBC");
0365:                put("Alg.Alias.Cipher.RC5-32", "RC5");
0366:                put("Cipher.RC5-64",
0367:                        "org.bouncycastle.jce.provider.JCEBlockCipher$RC564");
0368:                put("Cipher.RC6",
0369:                        "org.bouncycastle.jce.provider.JCEBlockCipher$RC6");
0370:                put("Cipher.RIJNDAEL",
0371:                        "org.bouncycastle.jce.provider.JCEBlockCipher$Rijndael");
0372:                put("Cipher.DESEDERFC3211WRAP",
0373:                        "org.bouncycastle.jce.provider.WrapCipherSpi$RFC3211DESedeWrap");
0374:                put("Cipher.SERPENT",
0375:                        "org.bouncycastle.jce.provider.JCEBlockCipher$Serpent");
0376:
0377:                put("Cipher.CAST6",
0378:                        "org.bouncycastle.jce.provider.JCEBlockCipher$CAST6");
0379:                put("Cipher.IDEA",
0380:                        "org.bouncycastle.jce.provider.JCEBlockCipher$IDEA");
0381:                put("Cipher.1.3.6.1.4.1.188.7.1.1.2",
0382:                        "org.bouncycastle.jce.provider.JCEBlockCipher$IDEACBC");
0383:                put("Alg.Alias.Cipher.PBEWithSHAAnd3KeyTripleDES",
0384:                        "PBEWITHSHAAND3-KEYTRIPLEDES-CBC");
0385:
0386:                put("Cipher.GOST28147",
0387:                        "org.bouncycastle.jce.provider.JCEBlockCipher$GOST28147");
0388:                put("Alg.Alias.Cipher.GOST", "GOST28147");
0389:                put("Alg.Alias.Cipher.GOST-28147", "GOST28147");
0390:                put("Cipher." + CryptoProObjectIdentifiers.gostR28147_cbc,
0391:                        "org.bouncycastle.jce.provider.JCEBlockCipher$GOST28147cbc");
0392:
0393:                put("Cipher.TEA",
0394:                        "org.bouncycastle.jce.provider.JCEBlockCipher$TEA");
0395:                put("Cipher.XTEA",
0396:                        "org.bouncycastle.jce.provider.JCEBlockCipher$XTEA");
0397:
0398:                put("Cipher.RSA",
0399:                        "org.bouncycastle.jce.provider.JCERSACipher$NoPadding");
0400:                put("Cipher.RSA/RAW",
0401:                        "org.bouncycastle.jce.provider.JCERSACipher$NoPadding");
0402:                put("Cipher.RSA/PKCS1",
0403:                        "org.bouncycastle.jce.provider.JCERSACipher$PKCS1v1_5Padding");
0404:                put("Cipher.1.2.840.113549.1.1.1",
0405:                        "org.bouncycastle.jce.provider.JCERSACipher$PKCS1v1_5Padding");
0406:                put("Cipher.2.5.8.1.1",
0407:                        "org.bouncycastle.jce.provider.JCERSACipher$PKCS1v1_5Padding");
0408:                put("Cipher.RSA/1",
0409:                        "org.bouncycastle.jce.provider.JCERSACipher$PKCS1v1_5Padding_PrivateOnly");
0410:                put("Cipher.RSA/2",
0411:                        "org.bouncycastle.jce.provider.JCERSACipher$PKCS1v1_5Padding_PublicOnly");
0412:                put("Cipher.RSA/OAEP",
0413:                        "org.bouncycastle.jce.provider.JCERSACipher$OAEPPadding");
0414:                put("Cipher.1.2.840.113549.1.1.7",
0415:                        "org.bouncycastle.jce.provider.JCERSACipher$OAEPPadding");
0416:                put("Cipher.RSA/ISO9796-1",
0417:                        "org.bouncycastle.jce.provider.JCERSACipher$ISO9796d1Padding");
0418:
0419:                put("Cipher.ECIES",
0420:                        "org.bouncycastle.jce.provider.JCEIESCipher$ECIES");
0421:                put("Cipher.BrokenECIES",
0422:                        "org.bouncycastle.jce.provider.JCEIESCipher$BrokenECIES");
0423:                put("Cipher.IES",
0424:                        "org.bouncycastle.jce.provider.JCEIESCipher$IES");
0425:                put("Cipher.BrokenIES",
0426:                        "org.bouncycastle.jce.provider.JCEIESCipher$BrokenIES");
0427:                put("Cipher.ELGAMAL",
0428:                        "org.bouncycastle.jce.provider.JCEElGamalCipher$NoPadding");
0429:                put("Cipher.ELGAMAL/PKCS1",
0430:                        "org.bouncycastle.jce.provider.JCEElGamalCipher$PKCS1v1_5Padding");
0431:
0432:                put("Alg.Alias.Cipher.RSA//RAW", "RSA");
0433:                put("Alg.Alias.Cipher.RSA//NOPADDING", "RSA");
0434:                put("Alg.Alias.Cipher.RSA//PKCS1PADDING", "RSA/PKCS1");
0435:                put("Alg.Alias.Cipher.RSA//OAEPPADDING", "RSA/OAEP");
0436:                put("Alg.Alias.Cipher.RSA//ISO9796-1PADDING", "RSA/ISO9796-1");
0437:
0438:                put("Alg.Alias.Cipher.ELGAMAL/ECB/PKCS1PADDING",
0439:                        "ELGAMAL/PKCS1");
0440:                put("Alg.Alias.Cipher.ELGAMAL/NONE/PKCS1PADDING",
0441:                        "ELGAMAL/PKCS1");
0442:                put("Alg.Alias.Cipher.ELGAMAL/NONE/NOPADDING", "ELGAMAL");
0443:
0444:                put("Cipher.PBEWITHMD5ANDDES",
0445:                        "org.bouncycastle.jce.provider.JCEBlockCipher$PBEWithMD5AndDES");
0446:                put("Cipher.BROKENPBEWITHMD5ANDDES",
0447:                        "org.bouncycastle.jce.provider.BrokenJCEBlockCipher$BrokePBEWithMD5AndDES");
0448:                put("Cipher.PBEWITHMD5ANDRC2",
0449:                        "org.bouncycastle.jce.provider.JCEBlockCipher$PBEWithMD5AndRC2");
0450:                put("Cipher.PBEWITHSHA1ANDDES",
0451:                        "org.bouncycastle.jce.provider.JCEBlockCipher$PBEWithSHA1AndDES");
0452:                put("Cipher.BROKENPBEWITHSHA1ANDDES",
0453:                        "org.bouncycastle.jce.provider.BrokenJCEBlockCipher$BrokePBEWithSHA1AndDES");
0454:                put("Cipher.PBEWITHSHA1ANDRC2",
0455:                        "org.bouncycastle.jce.provider.JCEBlockCipher$PBEWithSHA1AndRC2");
0456:                put("Cipher.PBEWITHSHAAND3-KEYTRIPLEDES-CBC",
0457:                        "org.bouncycastle.jce.provider.JCEBlockCipher$PBEWithSHAAndDES3Key");
0458:                put("Cipher.BROKENPBEWITHSHAAND3-KEYTRIPLEDES-CBC",
0459:                        "org.bouncycastle.jce.provider.BrokenJCEBlockCipher$BrokePBEWithSHAAndDES3Key");
0460:                put("Cipher.OLDPBEWITHSHAAND3-KEYTRIPLEDES-CBC",
0461:                        "org.bouncycastle.jce.provider.BrokenJCEBlockCipher$OldPBEWithSHAAndDES3Key");
0462:                put("Cipher.PBEWITHSHAAND2-KEYTRIPLEDES-CBC",
0463:                        "org.bouncycastle.jce.provider.JCEBlockCipher$PBEWithSHAAndDES2Key");
0464:                put("Cipher.BROKENPBEWITHSHAAND2-KEYTRIPLEDES-CBC",
0465:                        "org.bouncycastle.jce.provider.BrokenJCEBlockCipher$BrokePBEWithSHAAndDES2Key");
0466:                put("Cipher.PBEWITHSHAAND128BITRC2-CBC",
0467:                        "org.bouncycastle.jce.provider.JCEBlockCipher$PBEWithSHAAnd128BitRC2");
0468:                put("Cipher.PBEWITHSHAAND40BITRC2-CBC",
0469:                        "org.bouncycastle.jce.provider.JCEBlockCipher$PBEWithSHAAnd40BitRC2");
0470:                put("Cipher.PBEWITHSHAAND128BITRC4",
0471:                        "org.bouncycastle.jce.provider.JCEStreamCipher$PBEWithSHAAnd128BitRC4");
0472:                put("Cipher.PBEWITHSHAAND40BITRC4",
0473:                        "org.bouncycastle.jce.provider.JCEStreamCipher$PBEWithSHAAnd40BitRC4");
0474:
0475:                put("Alg.Alias.Cipher.PBEWITHSHA1AND3-KEYTRIPLEDES-CBC",
0476:                        "Cipher.PBEWITHSHAAND3-KEYTRIPLEDES-CBC");
0477:                put("Alg.Alias.Cipher.PBEWITHSHA1AND2-KEYTRIPLEDES-CBC",
0478:                        "Cipher.PBEWITHSHAAND2-KEYTRIPLEDES-CBC");
0479:                put("Alg.Alias.Cipher.PBEWITHSHA1AND128BITRC2-CBC",
0480:                        "Cipher.PBEWITHSHAAND128BITRC2-CBC");
0481:                put("Alg.Alias.Cipher.PBEWITHSHA1AND40BITRC2-CBC",
0482:                        "Cipher.PBEWITHSHAAND40BITRC2-CBC");
0483:                put("Alg.Alias.Cipher.PBEWITHSHA1AND128BITRC4",
0484:                        "Cipher.PBEWITHSHAAND128BITRC4");
0485:                put("Alg.Alias.Cipher.PBEWITHSHA1AND40BITRC4",
0486:                        "Cipher.PBEWITHSHAAND40BITRC4");
0487:
0488:                put("Cipher.PBEWITHSHAAND128BITAES-CBC-BC",
0489:                        "org.bouncycastle.jce.provider.JCEBlockCipher$PBEWithAESCBC");
0490:                put("Cipher.PBEWITHSHAAND192BITAES-CBC-BC",
0491:                        "org.bouncycastle.jce.provider.JCEBlockCipher$PBEWithAESCBC");
0492:                put("Cipher.PBEWITHSHAAND256BITAES-CBC-BC",
0493:                        "org.bouncycastle.jce.provider.JCEBlockCipher$PBEWithAESCBC");
0494:                put("Cipher.PBEWITHSHA256AND128BITAES-CBC-BC",
0495:                        "org.bouncycastle.jce.provider.JCEBlockCipher$PBEWithAESCBC");
0496:                put("Cipher.PBEWITHSHA256AND192BITAES-CBC-BC",
0497:                        "org.bouncycastle.jce.provider.JCEBlockCipher$PBEWithAESCBC");
0498:                put("Cipher.PBEWITHSHA256AND256BITAES-CBC-BC",
0499:                        "org.bouncycastle.jce.provider.JCEBlockCipher$PBEWithAESCBC");
0500:                put("Alg.Alias.Cipher.PBEWITHSHA1AND128BITAES-CBC-BC",
0501:                        "PBEWITHSHAAND128BITAES-CBC-BC");
0502:                put("Alg.Alias.Cipher.PBEWITHSHA1AND192BITAES-CBC-BC",
0503:                        "PBEWITHSHAAND192BITAES-CBC-BC");
0504:                put("Alg.Alias.Cipher.PBEWITHSHA1AND256BITAES-CBC-BC",
0505:                        "PBEWITHSHAAND256BITAES-CBC-BC");
0506:                put("Alg.Alias.Cipher.PBEWITHSHA-1AND128BITAES-CBC-BC",
0507:                        "PBEWITHSHAAND128BITAES-CBC-BC");
0508:                put("Alg.Alias.Cipher.PBEWITHSHA-1AND192BITAES-CBC-BC",
0509:                        "PBEWITHSHAAND192BITAES-CBC-BC");
0510:                put("Alg.Alias.Cipher.PBEWITHSHA-1AND256BITAES-CBC-BC",
0511:                        "PBEWITHSHAAND256BITAES-CBC-BC");
0512:                put("Alg.Alias.Cipher.PBEWITHSHA-256AND128BITAES-CBC-BC",
0513:                        "PBEWITHSHA256AND128BITAES-CBC-BC");
0514:                put("Alg.Alias.Cipher.PBEWITHSHA-256AND192BITAES-CBC-BC",
0515:                        "PBEWITHSHA256AND192BITAES-CBC-BC");
0516:                put("Alg.Alias.Cipher.PBEWITHSHA-256AND256BITAES-CBC-BC",
0517:                        "PBEWITHSHA256AND256BITAES-CBC-BC");
0518:
0519:                put("Cipher.PBEWITHMD5AND128BITAES-CBC-OPENSSL",
0520:                        "org.bouncycastle.jce.provider.JCEBlockCipher$PBEWithAESCBC");
0521:                put("Cipher.PBEWITHMD5AND192BITAES-CBC-OPENSSL",
0522:                        "org.bouncycastle.jce.provider.JCEBlockCipher$PBEWithAESCBC");
0523:                put("Cipher.PBEWITHMD5AND256BITAES-CBC-OPENSSL",
0524:                        "org.bouncycastle.jce.provider.JCEBlockCipher$PBEWithAESCBC");
0525:
0526:                put("Cipher.PBEWITHSHAANDTWOFISH-CBC",
0527:                        "org.bouncycastle.jce.provider.JCEBlockCipher$PBEWithSHAAndTwofish");
0528:                put("Cipher.OLDPBEWITHSHAANDTWOFISH-CBC",
0529:                        "org.bouncycastle.jce.provider.BrokenJCEBlockCipher$OldPBEWithSHAAndTwofish");
0530:                put("Cipher.PBEWITHSHAANDIDEA-CBC",
0531:                        "org.bouncycastle.jce.provider.JCEBlockCipher$PBEWithSHAAndIDEA");
0532:
0533:                put("Alg.Alias.Cipher.1.2.840.113549.1.12.1.1",
0534:                        "PBEWITHSHAAND128BITRC4");
0535:                put("Alg.Alias.Cipher.1.2.840.113549.1.12.1.2",
0536:                        "PBEWITHSHAAND40BITRC4");
0537:                put("Alg.Alias.Cipher.1.2.840.113549.1.12.1.3",
0538:                        "PBEWITHSHAAND3-KEYTRIPLEDES-CBC");
0539:                put("Alg.Alias.Cipher.1.2.840.113549.1.12.1.4",
0540:                        "PBEWITHSHAAND2-KEYTRIPLEDES-CBC");
0541:                put("Alg.Alias.Cipher.1.2.840.113549.1.12.1.5",
0542:                        "PBEWITHSHAAND128BITRC2-CBC");
0543:                put("Alg.Alias.Cipher.1.2.840.113549.1.12.1.6",
0544:                        "PBEWITHSHAAND40BITRC2-CBC");
0545:                put("Alg.Alias.Cipher.PBEWITHSHA1ANDDESEDE",
0546:                        "PBEWITHSHAAND3-KEYTRIPLEDES-CBC");
0547:                //
0548:                // key generators.
0549:                //
0550:                put("KeyGenerator.DES",
0551:                        "org.bouncycastle.jce.provider.JCEKeyGenerator$DES");
0552:                put("Alg.Alias.KeyGenerator.1.3.14.3.2.7", "DES");
0553:                put("KeyGenerator.DESEDE",
0554:                        "org.bouncycastle.jce.provider.JCEKeyGenerator$DESede");
0555:                put("KeyGenerator.1.2.840.113549.3.7",
0556:                        "org.bouncycastle.jce.provider.JCEKeyGenerator$DESede3");
0557:                put("KeyGenerator.DESEDEWRAP",
0558:                        "org.bouncycastle.jce.provider.JCEKeyGenerator$DESede");
0559:                put("KeyGenerator.SKIPJACK",
0560:                        "org.bouncycastle.jce.provider.JCEKeyGenerator$Skipjack");
0561:                put("KeyGenerator.BLOWFISH",
0562:                        "org.bouncycastle.jce.provider.JCEKeyGenerator$Blowfish");
0563:                put("KeyGenerator.TWOFISH",
0564:                        "org.bouncycastle.jce.provider.JCEKeyGenerator$Twofish");
0565:                put("KeyGenerator.RC2",
0566:                        "org.bouncycastle.jce.provider.JCEKeyGenerator$RC2");
0567:                put("KeyGenerator.1.2.840.113549.3.2",
0568:                        "org.bouncycastle.jce.provider.JCEKeyGenerator$RC2");
0569:                put("KeyGenerator.RC4",
0570:                        "org.bouncycastle.jce.provider.JCEKeyGenerator$RC4");
0571:                put("Alg.Alias.KeyGenerator.ARC4", "RC4");
0572:                put("Alg.Alias.KeyGenerator.1.2.840.113549.3.4", "RC4");
0573:                put("KeyGenerator.RC5",
0574:                        "org.bouncycastle.jce.provider.JCEKeyGenerator$RC5");
0575:                put("Alg.Alias.KeyGenerator.RC5-32", "RC5");
0576:                put("KeyGenerator.RC5-64",
0577:                        "org.bouncycastle.jce.provider.JCEKeyGenerator$RC564");
0578:                put("KeyGenerator.RC6",
0579:                        "org.bouncycastle.jce.provider.JCEKeyGenerator$RC6");
0580:                put("KeyGenerator.RIJNDAEL",
0581:                        "org.bouncycastle.jce.provider.JCEKeyGenerator$Rijndael");
0582:
0583:                put("KeyGenerator.SERPENT",
0584:                        "org.bouncycastle.jce.provider.JCEKeyGenerator$Serpent");
0585:                put("KeyGenerator.SALSA20",
0586:                        "org.bouncycastle.jce.provider.JCEKeyGenerator$Salsa20");
0587:                put("KeyGenerator.HC128",
0588:                        "org.bouncycastle.jce.provider.JCEKeyGenerator$HC128");
0589:                put("KeyGenerator.HC256",
0590:                        "org.bouncycastle.jce.provider.JCEKeyGenerator$HC256");
0591:                put("KeyGenerator.VMPC",
0592:                        "org.bouncycastle.jce.provider.JCEKeyGenerator$VMPC");
0593:                put("KeyGenerator.VMPC-KSA3",
0594:                        "org.bouncycastle.jce.provider.JCEKeyGenerator$VMPCKSA3");
0595:
0596:                put("KeyGenerator.CAST6",
0597:                        "org.bouncycastle.jce.provider.JCEKeyGenerator$CAST6");
0598:                put("KeyGenerator.IDEA",
0599:                        "org.bouncycastle.jce.provider.JCEKeyGenerator$IDEA");
0600:                put("KeyGenerator.1.3.6.1.4.1.188.7.1.1.2",
0601:                        "org.bouncycastle.jce.provider.JCEKeyGenerator$IDEA");
0602:                put("KeyGenerator.TEA",
0603:                        "org.bouncycastle.jce.provider.JCEKeyGenerator$TEA");
0604:                put("KeyGenerator.XTEA",
0605:                        "org.bouncycastle.jce.provider.JCEKeyGenerator$XTEA");
0606:
0607:                put("KeyGenerator.GOST28147",
0608:                        "org.bouncycastle.jce.provider.JCEKeyGenerator$GOST28147");
0609:                put("Alg.Alias.KeyGenerator.GOST", "GOST28147");
0610:                put("Alg.Alias.KeyGenerator.GOST-28147", "GOST28147");
0611:                put("Alg.Alias.KeyGenerator."
0612:                        + CryptoProObjectIdentifiers.gostR28147_cbc,
0613:                        "GOST28147");
0614:
0615:                //
0616:                // key pair generators.
0617:                //
0618:                put("KeyPairGenerator.RSA",
0619:                        "org.bouncycastle.jce.provider.JDKKeyPairGenerator$RSA");
0620:                put("KeyPairGenerator.DH",
0621:                        "org.bouncycastle.jce.provider.JDKKeyPairGenerator$DH");
0622:                put("KeyPairGenerator.DSA",
0623:                        "org.bouncycastle.jce.provider.JDKKeyPairGenerator$DSA");
0624:                put("KeyPairGenerator.ELGAMAL",
0625:                        "org.bouncycastle.jce.provider.JDKKeyPairGenerator$ElGamal");
0626:                put("KeyPairGenerator.EC",
0627:                        "org.bouncycastle.jce.provider.JDKKeyPairGenerator$EC");
0628:                put("KeyPairGenerator.ECDSA",
0629:                        "org.bouncycastle.jce.provider.JDKKeyPairGenerator$ECDSA");
0630:                put("KeyPairGenerator.ECDH",
0631:                        "org.bouncycastle.jce.provider.JDKKeyPairGenerator$ECDH");
0632:                put("KeyPairGenerator.ECDHC",
0633:                        "org.bouncycastle.jce.provider.JDKKeyPairGenerator$ECDHC");
0634:                put("KeyPairGenerator.ECIES",
0635:                        "org.bouncycastle.jce.provider.JDKKeyPairGenerator$ECDH");
0636:                put("Alg.Alias.KeyPairGenerator.1.2.840.113549.1.1.1", "RSA");
0637:
0638:                put("KeyPairGenerator.GOST3410",
0639:                        "org.bouncycastle.jce.provider.JDKKeyPairGenerator$GOST3410");
0640:                put("Alg.Alias.KeyPairGenerator.GOST-3410", "GOST3410");
0641:                put("Alg.Alias.KeyPairGenerator.GOST-3410-94", "GOST3410");
0642:
0643:                put("KeyPairGenerator.ECGOST3410",
0644:                        "org.bouncycastle.jce.provider.JDKKeyPairGenerator$ECGOST3410");
0645:                put("Alg.Alias.KeyPairGenerator.ECGOST-3410", "ECGOST3410");
0646:                put("Alg.Alias.KeyPairGenerator.GOST-3410-2001", "ECGOST3410");
0647:
0648:                //
0649:                // key factories
0650:                //
0651:                put("KeyFactory.RSA",
0652:                        "org.bouncycastle.jce.provider.JDKKeyFactory$RSA");
0653:                put("KeyFactory.DH",
0654:                        "org.bouncycastle.jce.provider.JDKKeyFactory$DH");
0655:                put("KeyFactory.DSA",
0656:                        "org.bouncycastle.jce.provider.JDKKeyFactory$DSA");
0657:                put("KeyFactory.ELGAMAL",
0658:                        "org.bouncycastle.jce.provider.JDKKeyFactory$ElGamal");
0659:                put("KeyFactory.ElGamal",
0660:                        "org.bouncycastle.jce.provider.JDKKeyFactory$ElGamal");
0661:                put("KeyFactory.EC",
0662:                        "org.bouncycastle.jce.provider.JDKKeyFactory$EC");
0663:                put("KeyFactory.ECDSA",
0664:                        "org.bouncycastle.jce.provider.JDKKeyFactory$ECDSA");
0665:                put("KeyFactory.ECDH",
0666:                        "org.bouncycastle.jce.provider.JDKKeyFactory$ECDH");
0667:                put("KeyFactory.ECDHC",
0668:                        "org.bouncycastle.jce.provider.JDKKeyFactory$ECDHC");
0669:                put("KeyFactory.X.509",
0670:                        "org.bouncycastle.jce.provider.JDKKeyFactory$X509");
0671:
0672:                put("Alg.Alias.KeyFactory.1.2.840.113549.1.1.1", "RSA");
0673:                put("Alg.Alias.KeyFactory.1.2.840.10040.4.1", "DSA");
0674:                put("Alg.Alias.KeyFactory."
0675:                        + X9ObjectIdentifiers.id_ecPublicKey, "EC");
0676:                put(
0677:                        "Alg.Alias.KeyFactory."
0678:                                + X9ObjectIdentifiers.dhSinglePass_stdDH_sha1kdf_scheme,
0679:                        "EC");
0680:
0681:                put("KeyFactory.GOST3410",
0682:                        "org.bouncycastle.jce.provider.JDKKeyFactory$GOST3410");
0683:                put("Alg.Alias.KeyFactory.GOST-3410", "GOST3410");
0684:                put("Alg.Alias.KeyFactory.GOST-3410-94", "GOST3410");
0685:                put("Alg.Alias.KeyFactory."
0686:                        + CryptoProObjectIdentifiers.gostR3410_94, "GOST3410");
0687:                put("KeyFactory.ECGOST3410",
0688:                        "org.bouncycastle.jce.provider.JDKKeyFactory$ECGOST3410");
0689:                put("Alg.Alias.KeyFactory.GOST-3410-2001", "ECGOST3410");
0690:                put("Alg.Alias.KeyFactory.ECGOST-3410", "ECGOST3410");
0691:                put("Alg.Alias.KeyFactory."
0692:                        + CryptoProObjectIdentifiers.gostR3410_2001,
0693:                        "ECGOST3410");
0694:
0695:                //
0696:                // Algorithm parameters
0697:                //
0698:                put("AlgorithmParameters.DES",
0699:                        "org.bouncycastle.jce.provider.JDKAlgorithmParameters$IVAlgorithmParameters");
0700:                put("Alg.Alias.AlgorithmParameters.1.3.14.3.2.7", "DES");
0701:                put("AlgorithmParameters.DESEDE",
0702:                        "org.bouncycastle.jce.provider.JDKAlgorithmParameters$IVAlgorithmParameters");
0703:                put("AlgorithmParameters.1.2.840.113549.3.7",
0704:                        "org.bouncycastle.jce.provider.JDKAlgorithmParameters$IVAlgorithmParameters");
0705:                put("AlgorithmParameters.RC2",
0706:                        "org.bouncycastle.jce.provider.JDKAlgorithmParameters$RC2AlgorithmParameters");
0707:                put("AlgorithmParameters.1.2.840.113549.3.2",
0708:                        "org.bouncycastle.jce.provider.JDKAlgorithmParameters$RC2AlgorithmParameters");
0709:                put("AlgorithmParameters.RC5",
0710:                        "org.bouncycastle.jce.provider.JDKAlgorithmParameters$IVAlgorithmParameters");
0711:                put("AlgorithmParameters.RC6",
0712:                        "org.bouncycastle.jce.provider.JDKAlgorithmParameters$IVAlgorithmParameters");
0713:                put("AlgorithmParameters.BLOWFISH",
0714:                        "org.bouncycastle.jce.provider.JDKAlgorithmParameters$IVAlgorithmParameters");
0715:                put("AlgorithmParameters.TWOFISH",
0716:                        "org.bouncycastle.jce.provider.JDKAlgorithmParameters$IVAlgorithmParameters");
0717:                put("AlgorithmParameters.SKIPJACK",
0718:                        "org.bouncycastle.jce.provider.JDKAlgorithmParameters$IVAlgorithmParameters");
0719:                put("AlgorithmParameters.RIJNDAEL",
0720:                        "org.bouncycastle.jce.provider.JDKAlgorithmParameters$IVAlgorithmParameters");
0721:
0722:                //
0723:                // secret key factories.
0724:                //
0725:                put("SecretKeyFactory.DES",
0726:                        "org.bouncycastle.jce.provider.JCESecretKeyFactory$DES");
0727:                put("SecretKeyFactory.DESEDE",
0728:                        "org.bouncycastle.jce.provider.JCESecretKeyFactory$DESede");
0729:                put("SecretKeyFactory.PBEWITHMD5ANDDES",
0730:                        "org.bouncycastle.jce.provider.JCESecretKeyFactory$PBEWithMD5AndDES");
0731:                put("SecretKeyFactory.PBEWITHMD5ANDRC2",
0732:                        "org.bouncycastle.jce.provider.JCESecretKeyFactory$PBEWithMD5AndRC2");
0733:                put("SecretKeyFactory.PBEWITHSHA1ANDDES",
0734:                        "org.bouncycastle.jce.provider.JCESecretKeyFactory$PBEWithSHA1AndDES");
0735:                put("SecretKeyFactory.PBEWITHSHA1ANDRC2",
0736:                        "org.bouncycastle.jce.provider.JCESecretKeyFactory$PBEWithSHA1AndRC2");
0737:                put("SecretKeyFactory.PBEWITHSHAAND3-KEYTRIPLEDES-CBC",
0738:                        "org.bouncycastle.jce.provider.JCESecretKeyFactory$PBEWithSHAAndDES3Key");
0739:                put("SecretKeyFactory.PBEWITHSHAAND2-KEYTRIPLEDES-CBC",
0740:                        "org.bouncycastle.jce.provider.JCESecretKeyFactory$PBEWithSHAAndDES2Key");
0741:                put("SecretKeyFactory.PBEWITHSHAAND128BITRC4",
0742:                        "org.bouncycastle.jce.provider.JCESecretKeyFactory$PBEWithSHAAnd128BitRC4");
0743:                put("SecretKeyFactory.PBEWITHSHAAND40BITRC4",
0744:                        "org.bouncycastle.jce.provider.JCESecretKeyFactory$PBEWithSHAAnd40BitRC4");
0745:                put("SecretKeyFactory.PBEWITHSHAAND128BITRC2-CBC",
0746:                        "org.bouncycastle.jce.provider.JCESecretKeyFactory$PBEWithSHAAnd128BitRC2");
0747:                put("SecretKeyFactory.PBEWITHSHAAND40BITRC2-CBC",
0748:                        "org.bouncycastle.jce.provider.JCESecretKeyFactory$PBEWithSHAAnd40BitRC2");
0749:                put("SecretKeyFactory.PBEWITHSHAANDTWOFISH-CBC",
0750:                        "org.bouncycastle.jce.provider.JCESecretKeyFactory$PBEWithSHAAndTwofish");
0751:                put("SecretKeyFactory.PBEWITHSHAANDIDEA-CBC",
0752:                        "org.bouncycastle.jce.provider.JCESecretKeyFactory$PBEWithSHAAndIDEA");
0753:                put("SecretKeyFactory.PBEWITHHMACRIPEMD160",
0754:                        "org.bouncycastle.jce.provider.JCESecretKeyFactory$PBEWithRIPEMD160");
0755:                put("SecretKeyFactory.PBEWITHHMACSHA1",
0756:                        "org.bouncycastle.jce.provider.JCESecretKeyFactory$PBEWithSHA");
0757:                put("SecretKeyFactory.PBEWITHHMACTIGER",
0758:                        "org.bouncycastle.jce.provider.JCESecretKeyFactory$PBEWithTiger");
0759:
0760:                put(
0761:                        "SecretKeyFactory.PBEWITHMD5AND128BITAES-CBC-OPENSSL",
0762:                        "org.bouncycastle.jce.provider.JCESecretKeyFactory$PBEWithMD5And128BitAESCBCOpenSSL");
0763:                put(
0764:                        "SecretKeyFactory.PBEWITHMD5AND192BITAES-CBC-OPENSSL",
0765:                        "org.bouncycastle.jce.provider.JCESecretKeyFactory$PBEWithMD5And192BitAESCBCOpenSSL");
0766:                put(
0767:                        "SecretKeyFactory.PBEWITHMD5AND256BITAES-CBC-OPENSSL",
0768:                        "org.bouncycastle.jce.provider.JCESecretKeyFactory$PBEWithMD5And256BitAESCBCOpenSSL");
0769:
0770:                put("Alg.Alias.SecretKeyFactory.PBE", "PBE/PKCS5");
0771:
0772:                put("Alg.Alias.SecretKeyFactory.BROKENPBEWITHMD5ANDDES",
0773:                        "PBE/PKCS5");
0774:                put("Alg.Alias.SecretKeyFactory.BROKENPBEWITHSHA1ANDDES",
0775:                        "PBE/PKCS5");
0776:                put(
0777:                        "Alg.Alias.SecretKeyFactory.OLDPBEWITHSHAAND3-KEYTRIPLEDES-CBC",
0778:                        "PBE/PKCS12");
0779:                put(
0780:                        "Alg.Alias.SecretKeyFactory.BROKENPBEWITHSHAAND3-KEYTRIPLEDES-CBC",
0781:                        "PBE/PKCS12");
0782:                put(
0783:                        "Alg.Alias.SecretKeyFactory.BROKENPBEWITHSHAAND2-KEYTRIPLEDES-CBC",
0784:                        "PBE/PKCS12");
0785:                put("Alg.Alias.SecretKeyFactory.OLDPBEWITHSHAANDTWOFISH-CBC",
0786:                        "PBE/PKCS12");
0787:
0788:                put("Alg.Alias.SecretKeyFactory.1.2.840.113549.1.12.1.1",
0789:                        "PBEWITHSHAAND128BITRC4");
0790:                put("Alg.Alias.SecretKeyFactory.1.2.840.113549.1.12.1.2",
0791:                        "PBEWITHSHAAND40BITRC4");
0792:                put("Alg.Alias.SecretKeyFactory.1.2.840.113549.1.12.1.3",
0793:                        "PBEWITHSHAAND3-KEYTRIPLEDES-CBC");
0794:                put("Alg.Alias.SecretKeyFactory.1.2.840.113549.1.12.1.4",
0795:                        "PBEWITHSHAAND2-KEYTRIPLEDES-CBC");
0796:                put("Alg.Alias.SecretKeyFactory.1.2.840.113549.1.12.1.5",
0797:                        "PBEWITHSHAAND128BITRC2-CBC");
0798:                put("Alg.Alias.SecretKeyFactory.1.2.840.113549.1.12.1.6",
0799:                        "PBEWITHSHAAND40BITRC2-CBC");
0800:                put("Alg.Alias.SecretKeyFactory.PBEWITHHMACSHA",
0801:                        "PBEWITHHMACSHA1");
0802:                put("Alg.Alias.SecretKeyFactory.1.3.14.3.2.26",
0803:                        "PBEWITHHMACSHA1");
0804:                put("Alg.Alias.SecretKeyFactory.PBEWithSHAAnd3KeyTripleDES",
0805:                        "PBEWITHSHAAND3-KEYTRIPLEDES-CBC");
0806:
0807:                put("SecretKeyFactory.PBEWITHSHAAND128BITAES-CBC-BC",
0808:                        "org.bouncycastle.jce.provider.JCESecretKeyFactory$PBEWithSHAAnd128BitAESBC");
0809:                put("SecretKeyFactory.PBEWITHSHAAND192BITAES-CBC-BC",
0810:                        "org.bouncycastle.jce.provider.JCESecretKeyFactory$PBEWithSHAAnd192BitAESBC");
0811:                put("SecretKeyFactory.PBEWITHSHAAND256BITAES-CBC-BC",
0812:                        "org.bouncycastle.jce.provider.JCESecretKeyFactory$PBEWithSHAAnd256BitAESBC");
0813:                put("SecretKeyFactory.PBEWITHSHA256AND128BITAES-CBC-BC",
0814:                        "org.bouncycastle.jce.provider.JCESecretKeyFactory$PBEWithSHA256And128BitAESBC");
0815:                put("SecretKeyFactory.PBEWITHSHA256AND192BITAES-CBC-BC",
0816:                        "org.bouncycastle.jce.provider.JCESecretKeyFactory$PBEWithSHA256And192BitAESBC");
0817:                put("SecretKeyFactory.PBEWITHSHA256AND256BITAES-CBC-BC",
0818:                        "org.bouncycastle.jce.provider.JCESecretKeyFactory$PBEWithSHA256And256BitAESBC");
0819:                put(
0820:                        "Alg.Alias.SecretKeyFactory.PBEWITHSHA1AND128BITAES-CBC-BC",
0821:                        "PBEWITHSHAAND128BITAES-CBC-BC");
0822:                put(
0823:                        "Alg.Alias.SecretKeyFactory.PBEWITHSHA1AND192BITAES-CBC-BC",
0824:                        "PBEWITHSHAAND192BITAES-CBC-BC");
0825:                put(
0826:                        "Alg.Alias.SecretKeyFactory.PBEWITHSHA1AND256BITAES-CBC-BC",
0827:                        "PBEWITHSHAAND256BITAES-CBC-BC");
0828:                put(
0829:                        "Alg.Alias.SecretKeyFactory.PBEWITHSHA-1AND128BITAES-CBC-BC",
0830:                        "PBEWITHSHAAND128BITAES-CBC-BC");
0831:                put(
0832:                        "Alg.Alias.SecretKeyFactory.PBEWITHSHA-1AND192BITAES-CBC-BC",
0833:                        "PBEWITHSHAAND192BITAES-CBC-BC");
0834:                put(
0835:                        "Alg.Alias.SecretKeyFactory.PBEWITHSHA-1AND256BITAES-CBC-BC",
0836:                        "PBEWITHSHAAND256BITAES-CBC-BC");
0837:                put(
0838:                        "Alg.Alias.SecretKeyFactory.PBEWITHSHA-256AND128BITAES-CBC-BC",
0839:                        "PBEWITHSHA256AND128BITAES-CBC-BC");
0840:                put(
0841:                        "Alg.Alias.SecretKeyFactory.PBEWITHSHA-256AND192BITAES-CBC-BC",
0842:                        "PBEWITHSHA256AND192BITAES-CBC-BC");
0843:                put(
0844:                        "Alg.Alias.SecretKeyFactory.PBEWITHSHA-256AND256BITAES-CBC-BC",
0845:                        "PBEWITHSHA256AND256BITAES-CBC-BC");
0846:
0847:                addMacAlgorithms();
0848:
0849:                addMessageDigestAlgorithms();
0850:
0851:                addSignatureAlgorithms();
0852:
0853:                // Certification Path API
0854:                put("CertPathValidator.PKIX",
0855:                        "org.bouncycastle.jce.provider.PKIXCertPathValidatorSpi");
0856:                put("CertPathValidator.PKIX ValidationAlgorithm", "RFC2459");
0857:                put("CertPathBuilder.PKIX",
0858:                        "org.bouncycastle.jce.provider.PKIXCertPathBuilderSpi");
0859:                put("CertPathBuilder.PKIX ValidationAlgorithm", "RFC2459");
0860:                put("CertStore.Collection",
0861:                        "org.bouncycastle.jce.provider.CertStoreCollectionSpi");
0862:                put("CertStore.LDAP",
0863:                        "org.bouncycastle.jce.provider.X509LDAPCertStoreSpi");
0864:                put("CertStore.Multi",
0865:                        "org.bouncycastle.jce.provider.MultiCertStoreSpi");
0866:                put("Alg.Alias.CertStore.X509LDAP", "LDAP");
0867:            }
0868:
0869:            private void addMappings(Map mappings) {
0870:                // can't use putAll due to JDK 1.1
0871:                for (Iterator it = mappings.keySet().iterator(); it.hasNext();) {
0872:                    Object key = it.next();
0873:
0874:                    if (containsKey(key)) {
0875:                        throw new IllegalStateException(
0876:                                "duplicate provider key (" + key
0877:                                        + ") found in "
0878:                                        + mappings.getClass().getName());
0879:                    }
0880:                    put(key, mappings.get(key));
0881:                }
0882:            }
0883:
0884:            //
0885:            // macs
0886:            //
0887:            private void addMacAlgorithms() {
0888:                put("Mac.DESMAC", "org.bouncycastle.jce.provider.JCEMac$DES");
0889:                put("Alg.Alias.Mac.DES", "DESMAC");
0890:                put("Mac.DESMAC/CFB8",
0891:                        "org.bouncycastle.jce.provider.JCEMac$DESCFB8");
0892:                put("Alg.Alias.Mac.DES/CFB8", "DESMAC/CFB8");
0893:
0894:                put("Mac.DESEDEMAC",
0895:                        "org.bouncycastle.jce.provider.JCEMac$DESede");
0896:                put("Alg.Alias.Mac.DESEDE", "DESEDEMAC");
0897:                put("Mac.DESEDEMAC/CFB8",
0898:                        "org.bouncycastle.jce.provider.JCEMac$DESedeCFB8");
0899:                put("Alg.Alias.Mac.DESEDE/CFB8", "DESEDEMAC/CFB8");
0900:
0901:                put("Mac.DESWITHISO9797",
0902:                        "org.bouncycastle.jce.provider.JCEMac$DES9797Alg3");
0903:                put("Alg.Alias.Mac.DESISO9797MAC", "DESWITHISO9797");
0904:
0905:                put("Mac.DESEDEMAC64",
0906:                        "org.bouncycastle.jce.provider.JCEMac$DESede64");
0907:                put("Alg.Alias.Mac.DESEDE64", "DESEDEMAC64");
0908:
0909:                put("Mac.DESEDEMAC64WITHISO7816-4PADDING",
0910:                        "org.bouncycastle.jce.provider.JCEMac$DESede64with7816d4");
0911:                put("Alg.Alias.Mac.DESEDE64WITHISO7816-4PADDING",
0912:                        "DESEDEMAC64WITHISO7816-4PADDING");
0913:                put("Alg.Alias.Mac.DESEDEISO9797ALG1MACWITHISO7816-4PADDING",
0914:                        "DESEDEMAC64WITHISO7816-4PADDING");
0915:                put("Alg.Alias.Mac.DESEDEISO9797ALG1WITHISO7816-4PADDING",
0916:                        "DESEDEMAC64WITHISO7816-4PADDING");
0917:
0918:                put("Mac.ISO9797ALG3MAC",
0919:                        "org.bouncycastle.jce.provider.JCEMac$DES9797Alg3");
0920:                put("Alg.Alias.Mac.ISO9797ALG3", "ISO9797ALG3MAC");
0921:                put("Mac.ISO9797ALG3WITHISO7816-4PADDING",
0922:                        "org.bouncycastle.jce.provider.JCEMac$DES9797Alg3with7816d4");
0923:                put("Alg.Alias.Mac.ISO9797ALG3MACWITHISO7816-4PADDING",
0924:                        "ISO9797ALG3WITHISO7816-4PADDING");
0925:
0926:                put("Mac.SKIPJACKMAC",
0927:                        "org.bouncycastle.jce.provider.JCEMac$Skipjack");
0928:                put("Alg.Alias.Mac.SKIPJACK", "SKIPJACKMAC");
0929:                put("Mac.SKIPJACKMAC/CFB8",
0930:                        "org.bouncycastle.jce.provider.JCEMac$SkipjackCFB8");
0931:                put("Alg.Alias.Mac.SKIPJACK/CFB8", "SKIPJACKMAC/CFB8");
0932:
0933:                put("Mac.IDEAMAC", "org.bouncycastle.jce.provider.JCEMac$IDEA");
0934:                put("Alg.Alias.Mac.IDEA", "IDEAMAC");
0935:                put("Mac.IDEAMAC/CFB8",
0936:                        "org.bouncycastle.jce.provider.JCEMac$IDEACFB8");
0937:                put("Alg.Alias.Mac.IDEA/CFB8", "IDEAMAC/CFB8");
0938:
0939:                put("Mac.RC2MAC", "org.bouncycastle.jce.provider.JCEMac$RC2");
0940:                put("Alg.Alias.Mac.RC2", "RC2MAC");
0941:                put("Mac.RC2MAC/CFB8",
0942:                        "org.bouncycastle.jce.provider.JCEMac$RC2CFB8");
0943:                put("Alg.Alias.Mac.RC2/CFB8", "RC2MAC/CFB8");
0944:
0945:                put("Mac.RC5MAC", "org.bouncycastle.jce.provider.JCEMac$RC5");
0946:                put("Alg.Alias.Mac.RC5", "RC5MAC");
0947:                put("Mac.RC5MAC/CFB8",
0948:                        "org.bouncycastle.jce.provider.JCEMac$RC5CFB8");
0949:                put("Alg.Alias.Mac.RC5/CFB8", "RC5MAC/CFB8");
0950:
0951:                put("Mac.GOST28147MAC",
0952:                        "org.bouncycastle.jce.provider.JCEMac$GOST28147");
0953:
0954:                put("Mac.OLDHMACSHA384",
0955:                        "org.bouncycastle.jce.provider.JCEMac$OldSHA384");
0956:
0957:                put("Mac.OLDHMACSHA512",
0958:                        "org.bouncycastle.jce.provider.JCEMac$OldSHA512");
0959:
0960:                addHMACAlgorithm("MD2",
0961:                        "org.bouncycastle.jce.provider.JCEMac$MD2",
0962:                        "org.bouncycastle.jce.provider.JCEKeyGenerator$MD2HMAC");
0963:                addHMACAlgorithm("MD4",
0964:                        "org.bouncycastle.jce.provider.JCEMac$MD4",
0965:                        "org.bouncycastle.jce.provider.JCEKeyGenerator$MD4HMAC");
0966:                addHMACAlgorithm("MD5",
0967:                        "org.bouncycastle.jce.provider.JCEMac$MD5",
0968:                        "org.bouncycastle.jce.provider.JCEKeyGenerator$MD5HMAC");
0969:                addHMACAlias("MD5", IANAObjectIdentifiers.hmacMD5);
0970:
0971:                addHMACAlgorithm("SHA1",
0972:                        "org.bouncycastle.jce.provider.JCEMac$SHA1",
0973:                        "org.bouncycastle.jce.provider.JCEKeyGenerator$HMACSHA1");
0974:                addHMACAlias("SHA1", PKCSObjectIdentifiers.id_hmacWithSHA1);
0975:                addHMACAlias("SHA1", IANAObjectIdentifiers.hmacSHA1);
0976:                addHMACAlgorithm("SHA224",
0977:                        "org.bouncycastle.jce.provider.JCEMac$SHA224",
0978:                        "org.bouncycastle.jce.provider.JCEKeyGenerator$HMACSHA224");
0979:                addHMACAlias("SHA224", PKCSObjectIdentifiers.id_hmacWithSHA224);
0980:                addHMACAlgorithm("SHA256",
0981:                        "org.bouncycastle.jce.provider.JCEMac$SHA256",
0982:                        "org.bouncycastle.jce.provider.JCEKeyGenerator$HMACSHA256");
0983:                addHMACAlias("SHA256", PKCSObjectIdentifiers.id_hmacWithSHA256);
0984:                addHMACAlgorithm("SHA384",
0985:                        "org.bouncycastle.jce.provider.JCEMac$SHA384",
0986:                        "org.bouncycastle.jce.provider.JCEKeyGenerator$HMACSHA384");
0987:                addHMACAlias("SHA384", PKCSObjectIdentifiers.id_hmacWithSHA384);
0988:                addHMACAlgorithm("SHA512",
0989:                        "org.bouncycastle.jce.provider.JCEMac$SHA512",
0990:                        "org.bouncycastle.jce.provider.JCEKeyGenerator$HMACSHA512");
0991:                addHMACAlias("SHA512", PKCSObjectIdentifiers.id_hmacWithSHA512);
0992:
0993:                addHMACAlgorithm("RIPEMD128",
0994:                        "org.bouncycastle.jce.provider.JCEMac$RIPEMD128",
0995:                        "org.bouncycastle.jce.provider.JCEKeyGenerator$RIPEMD128HMAC");
0996:                addHMACAlgorithm("RIPEMD160",
0997:                        "org.bouncycastle.jce.provider.JCEMac$RIPEMD160",
0998:                        "org.bouncycastle.jce.provider.JCEKeyGenerator$RIPEMD160HMAC");
0999:                addHMACAlias("RIPEMD160", IANAObjectIdentifiers.hmacRIPEMD160);
1000:
1001:                addHMACAlgorithm("TIGER",
1002:                        "org.bouncycastle.jce.provider.JCEMac$Tiger",
1003:                        "org.bouncycastle.jce.provider.JCEKeyGenerator$HMACTIGER");
1004:                addHMACAlias("TIGER", IANAObjectIdentifiers.hmacTIGER);
1005:
1006:                put("Mac.PBEWITHHMACSHA",
1007:                        "org.bouncycastle.jce.provider.JCEMac$PBEWithSHA");
1008:                put("Mac.PBEWITHHMACSHA1",
1009:                        "org.bouncycastle.jce.provider.JCEMac$PBEWithSHA");
1010:                put("Mac.PBEWITHHMACRIPEMD160",
1011:                        "org.bouncycastle.jce.provider.JCEMac$PBEWithRIPEMD160");
1012:                put("Alg.Alias.Mac.1.3.14.3.2.26", "PBEWITHHMACSHA");
1013:            }
1014:
1015:            private void addHMACAlgorithm(String algorithm,
1016:                    String algorithmClassName, String keyGeneratorClassName) {
1017:                String mainName = "HMAC" + algorithm;
1018:
1019:                put("Mac." + mainName, algorithmClassName);
1020:                put("Alg.Alias.Mac.HMAC-" + algorithm, mainName);
1021:                put("Alg.Alias.Mac.HMAC/" + algorithm, mainName);
1022:                put("KeyGenerator." + mainName, keyGeneratorClassName);
1023:                put("Alg.Alias.KeyGenerator.HMAC-" + algorithm, mainName);
1024:                put("Alg.Alias.KeyGenerator.HMAC/" + algorithm, mainName);
1025:            }
1026:
1027:            private void addHMACAlias(String algorithm, DERObjectIdentifier oid) {
1028:                String mainName = "HMAC" + algorithm;
1029:
1030:                put("Alg.Alias.Mac." + oid, mainName);
1031:                put("Alg.Alias.KeyGenerator." + oid, mainName);
1032:            }
1033:
1034:            //
1035:            // message digests
1036:            //
1037:            private void addMessageDigestAlgorithms() {
1038:                put("MessageDigest.SHA-1",
1039:                        "org.bouncycastle.jce.provider.JDKMessageDigest$SHA1");
1040:                put("Alg.Alias.MessageDigest.SHA1", "SHA-1");
1041:                put("Alg.Alias.MessageDigest.SHA", "SHA-1");
1042:                put("Alg.Alias.MessageDigest." + OIWObjectIdentifiers.idSHA1,
1043:                        "SHA-1");
1044:                put("MessageDigest.SHA-224",
1045:                        "org.bouncycastle.jce.provider.JDKMessageDigest$SHA224");
1046:                put("Alg.Alias.MessageDigest.SHA224", "SHA-224");
1047:                put("Alg.Alias.MessageDigest."
1048:                        + NISTObjectIdentifiers.id_sha224, "SHA-224");
1049:                put("MessageDigest.SHA-256",
1050:                        "org.bouncycastle.jce.provider.JDKMessageDigest$SHA256");
1051:                put("Alg.Alias.MessageDigest.SHA256", "SHA-256");
1052:                put("Alg.Alias.MessageDigest."
1053:                        + NISTObjectIdentifiers.id_sha256, "SHA-256");
1054:                put("MessageDigest.SHA-384",
1055:                        "org.bouncycastle.jce.provider.JDKMessageDigest$SHA384");
1056:                put("Alg.Alias.MessageDigest.SHA384", "SHA-384");
1057:                put("Alg.Alias.MessageDigest."
1058:                        + NISTObjectIdentifiers.id_sha384, "SHA-384");
1059:                put("MessageDigest.SHA-512",
1060:                        "org.bouncycastle.jce.provider.JDKMessageDigest$SHA512");
1061:                put("Alg.Alias.MessageDigest.SHA512", "SHA-512");
1062:                put("Alg.Alias.MessageDigest."
1063:                        + NISTObjectIdentifiers.id_sha512, "SHA-512");
1064:
1065:                put("MessageDigest.MD2",
1066:                        "org.bouncycastle.jce.provider.JDKMessageDigest$MD2");
1067:                put("Alg.Alias.MessageDigest." + PKCSObjectIdentifiers.md2,
1068:                        "MD2");
1069:                put("MessageDigest.MD4",
1070:                        "org.bouncycastle.jce.provider.JDKMessageDigest$MD4");
1071:                put("Alg.Alias.MessageDigest." + PKCSObjectIdentifiers.md4,
1072:                        "MD4");
1073:                put("MessageDigest.MD5",
1074:                        "org.bouncycastle.jce.provider.JDKMessageDigest$MD5");
1075:                put("Alg.Alias.MessageDigest." + PKCSObjectIdentifiers.md5,
1076:                        "MD5");
1077:                put("MessageDigest.RIPEMD128",
1078:                        "org.bouncycastle.jce.provider.JDKMessageDigest$RIPEMD128");
1079:                put("Alg.Alias.MessageDigest."
1080:                        + TeleTrusTObjectIdentifiers.ripemd128, "RIPEMD128");
1081:                put("MessageDigest.RIPEMD160",
1082:                        "org.bouncycastle.jce.provider.JDKMessageDigest$RIPEMD160");
1083:                put("Alg.Alias.MessageDigest."
1084:                        + TeleTrusTObjectIdentifiers.ripemd160, "RIPEMD160");
1085:                put("MessageDigest.RIPEMD256",
1086:                        "org.bouncycastle.jce.provider.JDKMessageDigest$RIPEMD256");
1087:                put("Alg.Alias.MessageDigest."
1088:                        + TeleTrusTObjectIdentifiers.ripemd256, "RIPEMD256");
1089:                put("MessageDigest.RIPEMD320",
1090:                        "org.bouncycastle.jce.provider.JDKMessageDigest$RIPEMD320");
1091:                put("MessageDigest.Tiger",
1092:                        "org.bouncycastle.jce.provider.JDKMessageDigest$Tiger");
1093:
1094:                put("MessageDigest.WHIRLPOOL",
1095:                        "org.bouncycastle.jce.provider.JDKMessageDigest$Whirlpool");
1096:
1097:                put("MessageDigest.GOST3411",
1098:                        "org.bouncycastle.jce.provider.JDKMessageDigest$GOST3411");
1099:                put("Alg.Alias.MessageDigest.GOST", "GOST3411");
1100:                put("Alg.Alias.MessageDigest.GOST-3411", "GOST3411");
1101:                put("Alg.Alias.MessageDigest."
1102:                        + CryptoProObjectIdentifiers.gostR3411, "GOST3411");
1103:            }
1104:
1105:            //
1106:            // signature algorithms.
1107:            //
1108:            private void addSignatureAlgorithms() {
1109:                put("Signature.MD2WithRSAEncryption",
1110:                        "org.bouncycastle.jce.provider.JDKDigestSignature$MD2WithRSAEncryption");
1111:                put("Signature.MD4WithRSAEncryption",
1112:                        "org.bouncycastle.jce.provider.JDKDigestSignature$MD4WithRSAEncryption");
1113:                put("Signature.MD5WithRSAEncryption",
1114:                        "org.bouncycastle.jce.provider.JDKDigestSignature$MD5WithRSAEncryption");
1115:                put("Signature.SHA1WithRSAEncryption",
1116:                        "org.bouncycastle.jce.provider.JDKDigestSignature$SHA1WithRSAEncryption");
1117:                put("Signature.SHA224WithRSAEncryption",
1118:                        "org.bouncycastle.jce.provider.JDKDigestSignature$SHA224WithRSAEncryption");
1119:                put("Signature.SHA256WithRSAEncryption",
1120:                        "org.bouncycastle.jce.provider.JDKDigestSignature$SHA256WithRSAEncryption");
1121:                put("Signature.SHA384WithRSAEncryption",
1122:                        "org.bouncycastle.jce.provider.JDKDigestSignature$SHA384WithRSAEncryption");
1123:                put("Signature.SHA512WithRSAEncryption",
1124:                        "org.bouncycastle.jce.provider.JDKDigestSignature$SHA512WithRSAEncryption");
1125:                put("Signature.RIPEMD160WithRSAEncryption",
1126:                        "org.bouncycastle.jce.provider.JDKDigestSignature$RIPEMD160WithRSAEncryption");
1127:                put("Signature.RIPEMD128WithRSAEncryption",
1128:                        "org.bouncycastle.jce.provider.JDKDigestSignature$RIPEMD128WithRSAEncryption");
1129:                put("Signature.RIPEMD256WithRSAEncryption",
1130:                        "org.bouncycastle.jce.provider.JDKDigestSignature$RIPEMD256WithRSAEncryption");
1131:                put("Signature.DSA",
1132:                        "org.bouncycastle.jce.provider.JDKDSASigner$stdDSA");
1133:                put("Signature.NONEWITHDSA",
1134:                        "org.bouncycastle.jce.provider.JDKDSASigner$noneDSA");
1135:                put("Signature.ECDSA",
1136:                        "org.bouncycastle.jce.provider.JDKDSASigner$ecDSA");
1137:                put("Signature.SHA1WITHECNR",
1138:                        "org.bouncycastle.jce.provider.JDKDSASigner$ecNR");
1139:                put("Signature.SHA224WITHECNR",
1140:                        "org.bouncycastle.jce.provider.JDKDSASigner$ecNR224");
1141:                put("Signature.SHA256WITHECNR",
1142:                        "org.bouncycastle.jce.provider.JDKDSASigner$ecNR256");
1143:                put("Signature.SHA384WITHECNR",
1144:                        "org.bouncycastle.jce.provider.JDKDSASigner$ecNR384");
1145:                put("Signature.SHA512WITHECNR",
1146:                        "org.bouncycastle.jce.provider.JDKDSASigner$ecNR512");
1147:                put("Signature.SHA1withRSA/ISO9796-2",
1148:                        "org.bouncycastle.jce.provider.JDKISOSignature$SHA1WithRSAEncryption");
1149:                put("Signature.MD5withRSA/ISO9796-2",
1150:                        "org.bouncycastle.jce.provider.JDKISOSignature$MD5WithRSAEncryption");
1151:                put("Signature.RIPEMD160withRSA/ISO9796-2",
1152:                        "org.bouncycastle.jce.provider.JDKISOSignature$RIPEMD160WithRSAEncryption");
1153:
1154:                put("Signature.RSASSA-PSS",
1155:                        "org.bouncycastle.jce.provider.JDKPSSSigner$PSSwithRSA");
1156:                put("Signature." + PKCSObjectIdentifiers.id_RSASSA_PSS,
1157:                        "org.bouncycastle.jce.provider.JDKPSSSigner$PSSwithRSA");
1158:                put("Signature.SHA1withRSA/PSS",
1159:                        "org.bouncycastle.jce.provider.JDKPSSSigner$SHA1withRSA");
1160:                put("Signature.SHA224withRSA/PSS",
1161:                        "org.bouncycastle.jce.provider.JDKPSSSigner$SHA224withRSA");
1162:                put("Signature.SHA256withRSA/PSS",
1163:                        "org.bouncycastle.jce.provider.JDKPSSSigner$SHA256withRSA");
1164:                put("Signature.SHA384withRSA/PSS",
1165:                        "org.bouncycastle.jce.provider.JDKPSSSigner$SHA384withRSA");
1166:                put("Signature.SHA512withRSA/PSS",
1167:                        "org.bouncycastle.jce.provider.JDKPSSSigner$SHA512withRSA");
1168:
1169:                put("Alg.Alias.Signature.RAWDSA", "NONEWITHDSA");
1170:
1171:                put("Alg.Alias.Signature.SHA1withRSAandMGF1", "SHA1withRSA/PSS");
1172:                put("Alg.Alias.Signature.SHA224withRSAandMGF1",
1173:                        "SHA224withRSA/PSS");
1174:                put("Alg.Alias.Signature.SHA256withRSAandMGF1",
1175:                        "SHA256withRSA/PSS");
1176:                put("Alg.Alias.Signature.SHA384withRSAandMGF1",
1177:                        "SHA384withRSA/PSS");
1178:                put("Alg.Alias.Signature.SHA512withRSAandMGF1",
1179:                        "SHA512withRSA/PSS");
1180:
1181:                put("Alg.Alias.Signature.MD2withRSAEncryption",
1182:                        "MD2WithRSAEncryption");
1183:                put("Alg.Alias.Signature.MD4withRSAEncryption",
1184:                        "MD4WithRSAEncryption");
1185:                put("Alg.Alias.Signature.MD5withRSAEncryption",
1186:                        "MD5WithRSAEncryption");
1187:                put("Alg.Alias.Signature.SHA1withRSAEncryption",
1188:                        "SHA1WithRSAEncryption");
1189:                put("Alg.Alias.Signature.SHA224withRSAEncryption",
1190:                        "SHA224WithRSAEncryption");
1191:
1192:                put("Alg.Alias.Signature.SHA256withRSAEncryption",
1193:                        "SHA256WithRSAEncryption");
1194:                put("Alg.Alias.Signature.SHA384withRSAEncryption",
1195:                        "SHA384WithRSAEncryption");
1196:                put("Alg.Alias.Signature.SHA512withRSAEncryption",
1197:                        "SHA512WithRSAEncryption");
1198:
1199:                put("Alg.Alias.Signature.SHA256WithRSAEncryption",
1200:                        "SHA256WithRSAEncryption");
1201:                put("Alg.Alias.Signature.SHA384WithRSAEncryption",
1202:                        "SHA384WithRSAEncryption");
1203:                put("Alg.Alias.Signature.SHA512WithRSAEncryption",
1204:                        "SHA512WithRSAEncryption");
1205:
1206:                put("Alg.Alias.Signature.SHA256WITHRSAENCRYPTION",
1207:                        "SHA256WithRSAEncryption");
1208:                put("Alg.Alias.Signature.SHA384WITHRSAENCRYPTION",
1209:                        "SHA384WithRSAEncryption");
1210:                put("Alg.Alias.Signature.SHA512WITHRSAENCRYPTION",
1211:                        "SHA512WithRSAEncryption");
1212:
1213:                put("Alg.Alias.Signature.RIPEMD160withRSAEncryption",
1214:                        "RIPEMD160WithRSAEncryption");
1215:
1216:                put("Alg.Alias.Signature."
1217:                        + PKCSObjectIdentifiers.md2WithRSAEncryption,
1218:                        "MD2WithRSAEncryption");
1219:                put("Alg.Alias.Signature.MD2WithRSA", "MD2WithRSAEncryption");
1220:                put("Alg.Alias.Signature.MD2withRSA", "MD2WithRSAEncryption");
1221:                put("Alg.Alias.Signature.MD2/RSA", "MD2WithRSAEncryption");
1222:                put("Alg.Alias.Signature.MD5WithRSA", "MD5WithRSAEncryption");
1223:                put("Alg.Alias.Signature.MD5withRSA", "MD5WithRSAEncryption");
1224:                put("Alg.Alias.Signature.MD5/RSA", "MD5WithRSAEncryption");
1225:                put("Alg.Alias.Signature."
1226:                        + PKCSObjectIdentifiers.md5WithRSAEncryption,
1227:                        "MD5WithRSAEncryption");
1228:                put("Alg.Alias.Signature.MD4WithRSA", "MD4WithRSAEncryption");
1229:                put("Alg.Alias.Signature.MD4withRSA", "MD4WithRSAEncryption");
1230:                put("Alg.Alias.Signature.MD4/RSA", "MD4WithRSAEncryption");
1231:                put("Alg.Alias.Signature."
1232:                        + PKCSObjectIdentifiers.md4WithRSAEncryption,
1233:                        "MD4WithRSAEncryption");
1234:                put("Alg.Alias.Signature.SHA1WithRSA", "SHA1WithRSAEncryption");
1235:                put("Alg.Alias.Signature.SHA1withRSA", "SHA1WithRSAEncryption");
1236:                put("Alg.Alias.Signature.SHA224WithRSA",
1237:                        "SHA224WithRSAEncryption");
1238:                put("Alg.Alias.Signature.SHA224withRSA",
1239:                        "SHA224WithRSAEncryption");
1240:                put("Alg.Alias.Signature.SHA256WithRSA",
1241:                        "SHA256WithRSAEncryption");
1242:                put("Alg.Alias.Signature.SHA256withRSA",
1243:                        "SHA256WithRSAEncryption");
1244:                put("Alg.Alias.Signature.SHA384WithRSA",
1245:                        "SHA384WithRSAEncryption");
1246:                put("Alg.Alias.Signature.SHA384withRSA",
1247:                        "SHA384WithRSAEncryption");
1248:                put("Alg.Alias.Signature.SHA512WithRSA",
1249:                        "SHA512WithRSAEncryption");
1250:                put("Alg.Alias.Signature.SHA512withRSA",
1251:                        "SHA512WithRSAEncryption");
1252:                put("Alg.Alias.Signature.SHA1/RSA", "SHA1WithRSAEncryption");
1253:                put("Alg.Alias.Signature.SHA-1/RSA", "SHA1WithRSAEncryption");
1254:                put("Alg.Alias.Signature."
1255:                        + PKCSObjectIdentifiers.sha1WithRSAEncryption,
1256:                        "SHA1WithRSAEncryption");
1257:                put("Alg.Alias.Signature."
1258:                        + PKCSObjectIdentifiers.sha224WithRSAEncryption,
1259:                        "SHA224WithRSAEncryption");
1260:                put("Alg.Alias.Signature."
1261:                        + PKCSObjectIdentifiers.sha256WithRSAEncryption,
1262:                        "SHA256WithRSAEncryption");
1263:                put("Alg.Alias.Signature."
1264:                        + PKCSObjectIdentifiers.sha384WithRSAEncryption,
1265:                        "SHA384WithRSAEncryption");
1266:                put("Alg.Alias.Signature."
1267:                        + PKCSObjectIdentifiers.sha512WithRSAEncryption,
1268:                        "SHA512WithRSAEncryption");
1269:                put(
1270:                        "Alg.Alias.Signature.1.3.14.3.2.26with1.2.840.113549.1.1.1",
1271:                        "SHA1WithRSAEncryption");
1272:                put(
1273:                        "Alg.Alias.Signature.1.3.14.3.2.26with1.2.840.113549.1.1.5",
1274:                        "SHA1WithRSAEncryption");
1275:                put(
1276:                        "Alg.Alias.Signature.1.2.840.113549.2.5with1.2.840.113549.1.1.1",
1277:                        "MD5WithRSAEncryption");
1278:                put("Alg.Alias.Signature.RIPEMD160WithRSA",
1279:                        "RIPEMD160WithRSAEncryption");
1280:                put("Alg.Alias.Signature.RIPEMD160withRSA",
1281:                        "RIPEMD160WithRSAEncryption");
1282:                put("Alg.Alias.Signature.RIPEMD128WithRSA",
1283:                        "RIPEMD128WithRSAEncryption");
1284:                put("Alg.Alias.Signature.RIPEMD128withRSA",
1285:                        "RIPEMD128WithRSAEncryption");
1286:                put("Alg.Alias.Signature.RIPEMD256WithRSA",
1287:                        "RIPEMD256WithRSAEncryption");
1288:                put("Alg.Alias.Signature.RIPEMD256withRSA",
1289:                        "RIPEMD256WithRSAEncryption");
1290:                put("Alg.Alias.Signature.RIPEMD-160/RSA",
1291:                        "RIPEMD160WithRSAEncryption");
1292:                put("Alg.Alias.Signature.RMD160withRSA",
1293:                        "RIPEMD160WithRSAEncryption");
1294:                put("Alg.Alias.Signature.RMD160/RSA",
1295:                        "RIPEMD160WithRSAEncryption");
1296:                put("Alg.Alias.Signature.1.3.36.3.3.1.2",
1297:                        "RIPEMD160WithRSAEncryption");
1298:                put("Alg.Alias.Signature.1.3.36.3.3.1.3",
1299:                        "RIPEMD128WithRSAEncryption");
1300:                put("Alg.Alias.Signature.1.3.36.3.3.1.4",
1301:                        "RIPEMD256WithRSAEncryption");
1302:                put("Alg.Alias.Signature." + OIWObjectIdentifiers.sha1WithRSA,
1303:                        "SHA1WithRSAEncryption");
1304:
1305:                put("Alg.Alias.Signature.MD2WITHRSAENCRYPTION",
1306:                        "MD2WithRSAEncryption");
1307:                put("Alg.Alias.Signature.MD5WITHRSAENCRYPTION",
1308:                        "MD5WithRSAEncryption");
1309:                put("Alg.Alias.Signature.SHA1WITHRSAENCRYPTION",
1310:                        "SHA1WithRSAEncryption");
1311:                put("Alg.Alias.Signature.RIPEMD160WITHRSAENCRYPTION",
1312:                        "RIPEMD160WithRSAEncryption");
1313:
1314:                put("Alg.Alias.Signature.MD5WITHRSA", "MD5WithRSAEncryption");
1315:                put("Alg.Alias.Signature.SHA1WITHRSA", "SHA1WithRSAEncryption");
1316:                put("Alg.Alias.Signature.RIPEMD160WITHRSA",
1317:                        "RIPEMD160WithRSAEncryption");
1318:                put("Alg.Alias.Signature.RMD160WITHRSA",
1319:                        "RIPEMD160WithRSAEncryption");
1320:                put("Alg.Alias.Signature.RIPEMD160WITHRSA",
1321:                        "RIPEMD160WithRSAEncryption");
1322:
1323:                put("Alg.Alias.Signature.SHA1withECDSA", "ECDSA");
1324:                put("Alg.Alias.Signature.ECDSAwithSHA1", "ECDSA");
1325:                put("Alg.Alias.Signature.SHA1WITHECDSA", "ECDSA");
1326:                put("Alg.Alias.Signature.ECDSAWITHSHA1", "ECDSA");
1327:                put("Alg.Alias.Signature.SHA1WithECDSA", "ECDSA");
1328:                put("Alg.Alias.Signature.ECDSAWithSHA1", "ECDSA");
1329:                put("Alg.Alias.Signature.1.2.840.10045.4.1", "ECDSA");
1330:                put("Alg.Alias.Signature."
1331:                        + TeleTrusTObjectIdentifiers.ecSignWithSha1, "ECDSA");
1332:
1333:                addSignatureAlgorithm("SHA224", "ECDSA",
1334:                        "org.bouncycastle.jce.provider.JDKDSASigner$ecDSA224",
1335:                        X9ObjectIdentifiers.ecdsa_with_SHA224);
1336:                addSignatureAlgorithm("SHA256", "ECDSA",
1337:                        "org.bouncycastle.jce.provider.JDKDSASigner$ecDSA256",
1338:                        X9ObjectIdentifiers.ecdsa_with_SHA256);
1339:                addSignatureAlgorithm("SHA384", "ECDSA",
1340:                        "org.bouncycastle.jce.provider.JDKDSASigner$ecDSA384",
1341:                        X9ObjectIdentifiers.ecdsa_with_SHA384);
1342:                addSignatureAlgorithm("SHA512", "ECDSA",
1343:                        "org.bouncycastle.jce.provider.JDKDSASigner$ecDSA512",
1344:                        X9ObjectIdentifiers.ecdsa_with_SHA512);
1345:                addSignatureAlgorithm(
1346:                        "RIPEMD160",
1347:                        "ECDSA",
1348:                        "org.bouncycastle.jce.provider.JDKDSASigner$ecDSARipeMD160",
1349:                        TeleTrusTObjectIdentifiers.ecSignWithRipemd160);
1350:
1351:                addSignatureAlgorithm("SHA224", "DSA",
1352:                        "org.bouncycastle.jce.provider.JDKDSASigner$dsa224",
1353:                        NISTObjectIdentifiers.dsa_with_sha224);
1354:                addSignatureAlgorithm("SHA256", "DSA",
1355:                        "org.bouncycastle.jce.provider.JDKDSASigner$dsa256",
1356:                        NISTObjectIdentifiers.dsa_with_sha256);
1357:                addSignatureAlgorithm("SHA384", "DSA",
1358:                        "org.bouncycastle.jce.provider.JDKDSASigner$dsa384",
1359:                        NISTObjectIdentifiers.dsa_with_sha384);
1360:                addSignatureAlgorithm("SHA512", "DSA",
1361:                        "org.bouncycastle.jce.provider.JDKDSASigner$dsa512",
1362:                        NISTObjectIdentifiers.dsa_with_sha512);
1363:
1364:                put("Alg.Alias.Signature.SHA/DSA", "DSA");
1365:                put("Alg.Alias.Signature.SHA1withDSA", "DSA");
1366:                put("Alg.Alias.Signature.SHA1WITHDSA", "DSA");
1367:                put("Alg.Alias.Signature.1.3.14.3.2.26with1.2.840.10040.4.1",
1368:                        "DSA");
1369:                put("Alg.Alias.Signature.1.3.14.3.2.26with1.2.840.10040.4.3",
1370:                        "DSA");
1371:                put("Alg.Alias.Signature.DSAwithSHA1", "DSA");
1372:                put("Alg.Alias.Signature.DSAWITHSHA1", "DSA");
1373:                put("Alg.Alias.Signature.SHA1WithDSA", "DSA");
1374:                put("Alg.Alias.Signature.DSAWithSHA1", "DSA");
1375:                put("Alg.Alias.Signature.1.2.840.10040.4.3", "DSA");
1376:                put("Alg.Alias.Signature.MD5WithRSA/ISO9796-2",
1377:                        "MD5withRSA/ISO9796-2");
1378:                put("Alg.Alias.Signature.SHA1WithRSA/ISO9796-2",
1379:                        "SHA1withRSA/ISO9796-2");
1380:                put("Alg.Alias.Signature.RIPEMD160WithRSA/ISO9796-2",
1381:                        "RIPEMD160withRSA/ISO9796-2");
1382:
1383:                put("Signature.ECGOST3410",
1384:                        "org.bouncycastle.jce.provider.JDKGOST3410Signer$ecgost3410");
1385:                put("Alg.Alias.Signature.ECGOST-3410", "ECGOST3410");
1386:                put("Alg.Alias.Signature.GOST-3410-2001", "ECGOST3410");
1387:                put("Alg.Alias.Signature.GOST3411withECGOST3410", "ECGOST3410");
1388:                put("Alg.Alias.Signature.GOST3411WITHECGOST3410", "ECGOST3410");
1389:                put("Alg.Alias.Signature.GOST3411WithECGOST3410", "ECGOST3410");
1390:                put(
1391:                        "Alg.Alias.Signature."
1392:                                + CryptoProObjectIdentifiers.gostR3411_94_with_gostR3410_2001,
1393:                        "ECGOST3410");
1394:
1395:                put("Signature.GOST3410",
1396:                        "org.bouncycastle.jce.provider.JDKGOST3410Signer$gost3410");
1397:                put("Alg.Alias.Signature.GOST-3410", "GOST3410");
1398:                put("Alg.Alias.Signature.GOST-3410-94", "GOST3410");
1399:                put("Alg.Alias.Signature.GOST3411withGOST3410", "GOST3410");
1400:                put("Alg.Alias.Signature.GOST3411WITHGOST3410", "GOST3410");
1401:                put("Alg.Alias.Signature.GOST3411WithGOST3410", "GOST3410");
1402:                put(
1403:                        "Alg.Alias.Signature."
1404:                                + CryptoProObjectIdentifiers.gostR3411_94_with_gostR3410_94,
1405:                        "GOST3410");
1406:            }
1407:
1408:            private void addSignatureAlgorithm(String digest, String algorithm,
1409:                    String className, DERObjectIdentifier oid) {
1410:                String mainName = digest + "WITH" + algorithm;
1411:                String jdk11Variation1 = digest + "with" + algorithm;
1412:                String jdk11Variation2 = digest + "With" + algorithm;
1413:                String alias = digest + "/" + algorithm;
1414:
1415:                put("Signature." + mainName, className);
1416:                put("Alg.Alias.Signature." + jdk11Variation1, mainName);
1417:                put("Alg.Alias.Signature." + jdk11Variation2, mainName);
1418:                put("Alg.Alias.Signature." + alias, mainName);
1419:                put("Alg.Alias.Signature." + oid, mainName);
1420:                put("Alg.Alias.Signature.OID." + oid, mainName);
1421:            }
1422:
1423:            public void setParameter(String parameterName, Object parameter) {
1424:                ProviderUtil.setParameter(parameterName, parameter);
1425:            }
1426:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.