code: private DSAParametersGenerator getGenerator(String hint)
      {
          if (hint == null || "SHA-1".equals(hint)) {
              return new DSAParametersGenerator();
          }
  
          DigestFactory factory;
  
          try {
              factory = this.manager.getInstance(DigestFactory.class, hint);
          } catch (ComponentLookupException e) {
              throw new UnsupportedOperationException("Cryptographic hash (digest) algorithm not found.", e);
          }
  
          if (!(factory instanceof AbstractBcDigestFactory)) {
              throw new IllegalArgumentException(
                  "Requested cryptographic hash algorithm is not implemented by a factory compatible with this factory."
                      + " Factory found: " + factory.getClass().getName());
          }
  
          return new DSAParametersGenerator(((AbstractBcDigestFactory) factory).getDigestInstance());
      }
docs: Create an instance of a DSA parameter generator using the appropriate hash algorithm.
  
  @param hint hint of the hash algorithm to use.
  @return a DSA parameter generator.