code: org.bouncycastle.crypto.params.DSAParameters getDsaParameters(SecureRandom random,
          DSAKeyParametersGenerationParameters params)
      {
          DSAParametersGenerator paramGen = getGenerator(params.getHashHint());
  
          if (params.use186r3()) {
              DSAParameterGenerationParameters p = new DSAParameterGenerationParameters(
                  params.getPrimePsize() * 8, params.getPrimeQsize() * 8,
                  params.getCertainty(), random,
                  getUsageIndex(params.getUsage()));
              paramGen.init(p);
          } else {
              paramGen.init(params.getStrength() * 8, params.getCertainty(), random);
          }
  
          return paramGen.generateParameters();
      }
docs: Generate DSA parameters.
  
  Shared with the key generator to optimize key generation.
  
  @param params the parameters generation parameters.
  @return shared DSA parameters for key generation.