internal string GetCurveName() { using (SafeNCryptKeyHandle keyHandle = GetDuplicatedKeyHandle()) // Ensure key\handle is created { string algorithm = _lastAlgorithm; if (IsECNamedCurve(algorithm)) { return(CngKeyLite.GetCurveName(keyHandle)); } // Use hard-coded values (for use with pre-Win10 APIs) return(SpecialNistAlgorithmToCurveName(algorithm)); } }
internal string GetCurveName(int callerKeySizeProperty) { // Ensure key\handle is created using (SafeNCryptKeyHandle keyHandle = GetDuplicatedKeyHandle(callerKeySizeProperty)) { string algorithm = _lastAlgorithm; if (ECCng.IsECNamedCurve(algorithm)) { return(CngKeyLite.GetCurveName(keyHandle)); } // Use hard-coded values (for use with pre-Win10 APIs) return(ECCng.SpecialNistAlgorithmToCurveName(algorithm)); } }