Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches

◆ GetECSpecificCurveName()

string System.Security.Cryptography.CngKey.GetECSpecificCurveName ( out string oidValue)
inlineprivate

Definition at line 460 of file CngKey.cs.

461 {
462 string algorithm = Algorithm.Algorithm;
463 if (algorithm == CngAlgorithm.ECDiffieHellmanP256.Algorithm || algorithm == CngAlgorithm.ECDsaP256.Algorithm)
464 {
465 oidValue = "1.2.840.10045.3.1.7";
466 return "nistP256";
467 }
468 if (algorithm == CngAlgorithm.ECDiffieHellmanP384.Algorithm || algorithm == CngAlgorithm.ECDsaP384.Algorithm)
469 {
470 oidValue = "1.3.132.0.34";
471 return "nistP384";
472 }
473 if (algorithm == CngAlgorithm.ECDiffieHellmanP521.Algorithm || algorithm == CngAlgorithm.ECDsaP521.Algorithm)
474 {
475 oidValue = "1.3.132.0.35";
476 return "nistP521";
477 }
478 throw new PlatformNotSupportedException(System.SR.Format(System.SR.Cryptography_CurveNotSupported, algorithm));
479 }
static string Cryptography_CurveNotSupported
Definition SR.cs:64
static string Format(string resourceFormat, object p1)
Definition SR.cs:118
Definition SR.cs:7

References System.Security.Cryptography.CngAlgorithm.Algorithm, System.Security.Cryptography.CngKey.Algorithm, System.SR.Cryptography_CurveNotSupported, System.Security.Cryptography.CngAlgorithm.ECDiffieHellmanP256, System.Security.Cryptography.CngAlgorithm.ECDiffieHellmanP384, System.Security.Cryptography.CngAlgorithm.ECDiffieHellmanP521, System.Security.Cryptography.CngAlgorithm.ECDsaP256, System.Security.Cryptography.CngAlgorithm.ECDsaP384, System.Security.Cryptography.CngAlgorithm.ECDsaP521, and System.SR.Format().

Referenced by System.Security.Cryptography.CngKey.GetCurveName().