/**
  * Returns one key manager for each type of key material.
  *
  * @return the key managers
  * @throws IllegalStateException if the KeyManagerFactory is not initialized
  */
 public final KeyManager[] getKeyManagers() {
   return factorySpi.engineGetKeyManagers();
 }
 /**
  * Initializes this factory with a source of provider-specific key material.
  *
  * <p>In some cases, initialization parameters other than a keystore and password may be needed by
  * a provider. Users of that particular provider are expected to pass an implementation of the
  * appropriate <CODE>ManagerFactoryParameters</CODE> as defined by the provider. The provider can
  * then call the specified methods in the <CODE>ManagerFactoryParameters</CODE> implementation to
  * obtain the needed information.
  *
  * @param spec an implementation of a provider-specific parameter specification
  * @throws InvalidAlgorithmParameterException if an error is encountered
  */
 public final void init(ManagerFactoryParameters spec) throws InvalidAlgorithmParameterException {
   factorySpi.engineInit(spec);
 }
 /**
  * Initializes this factory with a source of key material.
  *
  * <p>The provider typically uses a KeyStore for obtaining key material for use during secure
  * socket negotiations. The KeyStore is generally password-protected.
  *
  * <p>For more flexible initialization, please see {@link #init(ManagerFactoryParameters)}.
  *
  * @param ks the key store or null
  * @param password the password for recovering keys in the KeyStore
  * @throws KeyStoreException if this operation fails
  * @throws NoSuchAlgorithmException if the specified algorithm is not available from the specified
  *     provider.
  * @throws UnrecoverableKeyException if the key cannot be recovered (e.g. the given password is
  *     wrong).
  */
 public final void init(KeyStore ks, char[] password)
     throws KeyStoreException, NoSuchAlgorithmException, UnrecoverableKeyException {
   factorySpi.engineInit(ks, password);
 }
 /**
  * Initialize this instance with a key store and a password for private key entries.
  *
  * @param store The key store to read.
  * @param passwd The password protecting private keys in the store.
  * @throws KeyStoreException If an error occurs reading the keys.
  * @throws NoSuchAlgorithmException If an algorithm (such as a certificate algorithm) is not
  *     available.
  * @throws UnrecoverableKeyException If the password is incorrect.
  */
 public final void init(KeyStore store, char[] passwd)
     throws KeyStoreException, NoSuchAlgorithmException, UnrecoverableKeyException {
   kmfSpi.engineInit(store, passwd);
 }
 /**
  * Initialize this instance with an implementation-dependent parameter object.
  *
  * @param params The parameters to initialize with.
  * @throws InvalidAlgorithmParameterException If the specified parameters are inappropriate.
  */
 public final void init(ManagerFactoryParameters params)
     throws InvalidAlgorithmParameterException {
   kmfSpi.engineInit(params);
 }
 /**
  * Get an array of key managers appropriate for this algorithm, with the most preferred manager
  * first.
  *
  * @return The array of key managers.
  */
 public final KeyManager[] getKeyManagers() {
   return kmfSpi.engineGetKeyManagers();
 }