code: public static KeyPairGenerator getInstance(String algorithm,
              String provider)
              throws NoSuchAlgorithmException, NoSuchProviderException {
          Instance instance = GetInstance.getInstance("KeyPairGenerator",
                  KeyPairGeneratorSpi.class, algorithm, provider);
          return getInstance(instance, algorithm);
      }
docs: Returns a KeyPairGenerator object that generates public/private
  key pairs for the specified algorithm.
  
  <p> A new KeyPairGenerator object encapsulating the
  KeyPairGeneratorSpi implementation from the specified provider
  is returned.  The specified provider must be registered
  in the security provider list.
  
  <p> Note that the list of registered providers may be retrieved via
  the {@link Security#getProviders() Security.getProviders()} method.
  
  @param algorithm the standard string name of the algorithm.
  See the KeyPairGenerator section in the <a href=
  "{@docRoot}openjdk-redirect.html?v=8&path=/technotes/guides/security/StandardNames.html#KeyPairGenerator">
  Java Cryptography Architecture Standard Algorithm Name Documentation</a>
  for information about standard algorithm names.
  
  @param provider the string name of the provider.
  
  @return the new KeyPairGenerator object.
  
  @exception NoSuchAlgorithmException if a KeyPairGeneratorSpi
  implementation for the specified algorithm is not
  available from the specified provider.
  
  @exception NoSuchProviderException if the specified provider is not
  registered in the security provider list.
  
  @exception IllegalArgumentException if the provider name is null
  or empty.
  
  @see Provider