Exemplo n.º 1
0
 /**
  * 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);
 }
Exemplo n.º 2
0
 /**
  * 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();
 }
Exemplo n.º 3
0
 /**
  * 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);
 }