1 /*
2 * Copyright (c) 1999, 2015, 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
101 */
102 public final String getAlgorithm() {
103 return this.algorithm;
104 }
105
106 /**
107 * Returns a <code>KeyManagerFactory</code> object that acts as a
108 * factory for key managers.
109 *
110 * <p> This method traverses the list of registered security Providers,
111 * starting with the most preferred Provider.
112 * A new KeyManagerFactory object encapsulating the
113 * KeyManagerFactorySpi implementation from the first
114 * Provider that supports the specified algorithm is returned.
115 *
116 * <p> Note that the list of registered providers may be retrieved via
117 * the {@link Security#getProviders() Security.getProviders()} method.
118 *
119 * @implNote
120 * The JDK Reference Implementation additionally uses the
121 * {@code jdk.security.provider.preferred} property to determine
122 * the preferred provider order for the specified algorithm. This
123 * may be different than the order of providers returned by
124 * {@link Security#getProviders() Security.getProviders()}.
125 *
126 * @param algorithm the standard name of the requested algorithm.
127 * See the <a href=
128 * "{@docRoot}/../technotes/guides/security/jsse/JSSERefGuide.html">
129 * Java Secure Socket Extension Reference Guide </a>
130 * for information about standard algorithm names.
131 *
132 * @return the new <code>KeyManagerFactory</code> object.
133 *
134 * @exception NoSuchAlgorithmException if no Provider supports a
135 * KeyManagerFactorySpi implementation for the
136 * specified algorithm.
137 * @exception NullPointerException if <code>algorithm</code> is null.
138 *
139 * @see java.security.Provider
140 */
141 public static final KeyManagerFactory getInstance(String algorithm)
|
1 /*
2 * Copyright (c) 1999, 2016, 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
101 */
102 public final String getAlgorithm() {
103 return this.algorithm;
104 }
105
106 /**
107 * Returns a <code>KeyManagerFactory</code> object that acts as a
108 * factory for key managers.
109 *
110 * <p> This method traverses the list of registered security Providers,
111 * starting with the most preferred Provider.
112 * A new KeyManagerFactory object encapsulating the
113 * KeyManagerFactorySpi implementation from the first
114 * Provider that supports the specified algorithm is returned.
115 *
116 * <p> Note that the list of registered providers may be retrieved via
117 * the {@link Security#getProviders() Security.getProviders()} method.
118 *
119 * @implNote
120 * The JDK Reference Implementation additionally uses the
121 * {@code jdk.security.provider.preferred}
122 * {@link Security#getProperty(String) Security} property to determine
123 * the preferred provider order for the specified algorithm. This
124 * may be different than the order of providers returned by
125 * {@link Security#getProviders() Security.getProviders()}.
126 *
127 * @param algorithm the standard name of the requested algorithm.
128 * See the <a href=
129 * "{@docRoot}/../technotes/guides/security/jsse/JSSERefGuide.html">
130 * Java Secure Socket Extension Reference Guide </a>
131 * for information about standard algorithm names.
132 *
133 * @return the new <code>KeyManagerFactory</code> object.
134 *
135 * @exception NoSuchAlgorithmException if no Provider supports a
136 * KeyManagerFactorySpi implementation for the
137 * specified algorithm.
138 * @exception NullPointerException if <code>algorithm</code> is null.
139 *
140 * @see java.security.Provider
141 */
142 public static final KeyManagerFactory getInstance(String algorithm)
|