code: static int getUsageIndex(DSAKeyValidationParameters.Usage usage)
      {
          if (usage == DSAKeyValidationParameters.Usage.DIGITAL_SIGNATURE) {
              return DSAParameterGenerationParameters.DIGITAL_SIGNATURE_USAGE;
          } else if (usage == DSAKeyValidationParameters.Usage.KEY_ESTABLISHMENT) {
              return DSAParameterGenerationParameters.KEY_ESTABLISHMENT_USAGE;
          }
          return -1;
      }
docs: Convert key usage to key usage index.
  
  Shared with the key generator to optimize key generation.
  
  @param usage a key usage.
  @return a BC key usage index.