|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjavax.net.ssl.KeyManagerFactory
public class KeyManagerFactory
A class that creates key manager implementations based on a requested algorithm.
Constructor Summary | |
---|---|
protected |
KeyManagerFactory(KeyManagerFactorySpi kmfSpi,
Provider provider,
String algorithm)
Create a new key manager factory. |
Method Summary | |
---|---|
String |
getAlgorithm()
Returns the name of this key manager factory algorithm. |
static String |
getDefaultAlgorithm()
Get the default algorithm name. |
static KeyManagerFactory |
getInstance(String algorithm)
Create an instance of the named key manager factory, from the first provider that implements it. |
static KeyManagerFactory |
getInstance(String algorithm,
Provider provider)
Create an instance of the named key manager factory, from the given provider. |
static KeyManagerFactory |
getInstance(String algorithm,
String provider)
Create an instance of the named key manager factory, from the named provider. |
KeyManager[] |
getKeyManagers()
Get an array of key managers appropriate for this algorithm, with the most preferred manager first. |
Provider |
getProvider()
Returns the provider of this implementation. |
void |
init(KeyStore store,
char[] passwd)
Initialize this instance with a key store and a password for private key entries. |
void |
init(ManagerFactoryParameters params)
Initialize this instance with an implementation-dependent parameter object. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
protected KeyManagerFactory(KeyManagerFactorySpi kmfSpi, Provider provider, String algorithm)
kmfSpi
- The underlying engine.provider
- The engine's provider.algorithm
- The name of this algorithm.Method Detail |
---|
public static final String getDefaultAlgorithm()
public static final KeyManagerFactory getInstance(String algorithm) throws NoSuchAlgorithmException
algorithm
- The type of key manager factory to get.
NoSuchAlgorithmException
- If no provider implements the requested
algorithm.
IllegalArgumentException
- if algorithm
is
null
or is an empty string.public static final KeyManagerFactory getInstance(String algorithm, String provider) throws NoSuchAlgorithmException, NoSuchProviderException
algorithm
- The type of key manager factory to get.provider
- The name of the provider to get the implementation from.
NoSuchAlgorithmException
- If the provider does not implement the
requested algorithm.
NoSuchProviderException
- If the named provider does not exist.
IllegalArgumentException
- if either algorithm
or
provider
is null
, or if
algorithm
is an empty string.public static final KeyManagerFactory getInstance(String algorithm, Provider provider) throws NoSuchAlgorithmException
algorithm
- The type of key manager factory to get.provider
- The provider to get the implementation from.
NoSuchAlgorithmException
- If the provider does not implement the
requested algorithm.
IllegalArgumentException
- if either algorithm
or
provider
is null
, or if
algorithm
is an empty string.public final String getAlgorithm()
public final KeyManager[] getKeyManagers()
public final Provider getProvider()
public final void init(ManagerFactoryParameters params) throws InvalidAlgorithmParameterException
params
- The parameters to initialize with.
InvalidAlgorithmParameterException
- If the specified
parameters are inappropriate.public final void init(KeyStore store, char[] passwd) throws KeyStoreException, NoSuchAlgorithmException, UnrecoverableKeyException
store
- The key store to read.passwd
- The password protecting private keys in the store.
KeyStoreException
- If an error occurs reading the keys.
NoSuchAlgorithmException
- If an algorithm (such as a
certificate algorithm) is not available.
UnrecoverableKeyException
- If the password is incorrect.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |