19 internal int KeySize {
get;
private set; }
21 internal ECCngKey(
string algorithmGroup,
string disposedName)
27 internal string GetCurveName(
int callerKeySizeProperty, out
string oidValue)
49 string text = callerKeySizeProperty
switch
51 256 => flag ?
"ECDSA_P256" :
"ECDH_P256",
52 384 => flag ?
"ECDSA_P384" :
"ECDH_P384",
53 521 => flag ?
"ECDSA_P521" :
"ECDH_P521",
63 KeySize = callerKeySizeProperty;
94 global::Interop.NCrypt.ErrorCode hResult = (global::Interop.NCrypt.ErrorCode)ex.
HResult;
95 if ((curve.
IsNamed && hResult == global::Interop.NCrypt.ErrorCode.NTE_INVALID_PARAMETER) || hResult == global::Interop.NCrypt.ErrorCode.NTE_NOT_SUPPORTED)
static string Cryptography_CurveNotSupported
static string Format(string resourceFormat, object p1)
static string Cryptography_InvalidCurveOid
static string Cryptography_InvalidKeySize
static int GetKeyLength(SafeNCryptKeyHandle keyHandle)
static string GetCurveName(SafeNCryptHandle ncryptHandle)
static SafeNCryptKeyHandle GenerateNewExportableKey(string algorithm, int keySize)
void GenerateKey(ECCurve curve)
ECCngKey(string algorithmGroup, string disposedName)
readonly string _algorithmGroup
string GetCurveName(int callerKeySizeProperty, out string oidValue)
readonly string _disposedName
void SetHandle(SafeNCryptKeyHandle keyHandle, string algorithmName)
SafeNCryptKeyHandle GetDuplicatedKeyHandle(int callerKeySizeProperty)
SafeNCryptKeyHandle _keyHandle
static string EcdhCurveNameToAlgorithm(string algorithm)
static string EcdsaCurveNameToAlgorithm(string algorithm)
static bool IsECNamedCurve(string algorithm)
static string SpecialNistAlgorithmToCurveName(string algorithm, out string oidValue)