code: public static Signature getInstance(String algorithm, Provider provider)
              throws NoSuchAlgorithmException {
          if (algorithm.equalsIgnoreCase(RSA_SIGNATURE)) {
              // exception compatibility with existing code
              if (provider == null) {
                  throw new IllegalArgumentException("missing provider");
              }
              return getInstanceRSA(provider);
          }
          Instance instance = GetInstance.getInstance
                  ("Signature", SignatureSpi.class, algorithm, provider);
          return getInstance(instance, algorithm);
      }
docs: Returns a Signature object that implements the specified
  signature algorithm.
  
  <p> A new Signature object encapsulating the
  SignatureSpi implementation from the specified Provider
  object is returned.  Note that the specified Provider object
  does not have to be registered in the provider list.
  
  @param algorithm the name of the algorithm requested.
  See the Signature section in the <a href=
  "{@docRoot}openjdk-redirect.html?v=8&path=/technotes/guides/security/StandardNames.html#Signature">
  Java Cryptography Architecture Standard Algorithm Name Documentation</a>
  for information about standard algorithm names.
  
  @param provider the provider.
  
  @return the new Signature object.
  
  @exception NoSuchAlgorithmException if a SignatureSpi
  implementation for the specified algorithm is not available
  from the specified Provider object.
  
  @exception IllegalArgumentException if the provider is null.
  
  @see Provider
  
  @since 1.4