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

◆ TryFromOid()

static bool System.Security.Cryptography.HashAlgorithmName.TryFromOid ( string oidValue,
out HashAlgorithmName value )
inlinestatic

Definition at line 64 of file HashAlgorithmName.cs.

65 {
66 if (oidValue == null)
67 {
68 throw new ArgumentNullException("oidValue");
69 }
70 switch (oidValue)
71 {
72 case "1.2.840.113549.2.5":
73 value = MD5;
74 return true;
75 case "1.3.14.3.2.26":
76 value = SHA1;
77 return true;
78 case "2.16.840.1.101.3.4.2.1":
79 value = SHA256;
80 return true;
81 case "2.16.840.1.101.3.4.2.2":
82 value = SHA384;
83 return true;
84 case "2.16.840.1.101.3.4.2.3":
85 value = SHA512;
86 return true;
87 default:
88 value = default(HashAlgorithmName);
89 return false;
90 }
91 }

References System.Security.Cryptography.HashAlgorithmName.MD5, System.Security.Cryptography.HashAlgorithmName.SHA1, System.Security.Cryptography.HashAlgorithmName.SHA256, System.Security.Cryptography.HashAlgorithmName.SHA384, System.Security.Cryptography.HashAlgorithmName.SHA512, and System.value.

Referenced by System.Security.Cryptography.HashAlgorithmName.FromOid().