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 ; }
Convert key usage to key usage index .