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

◆ MapNameToOID()

static ? string System.Security.Cryptography.CryptoConfig.MapNameToOID ( string name)
inlinestatic

Definition at line 339 of file CryptoConfig.cs.

340 {
341 if (name == null)
342 {
343 throw new ArgumentNullException("name");
344 }
345 appOidHT.TryGetValue(name, out var value);
346 if (string.IsNullOrEmpty(value) && !DefaultOidHT.TryGetValue(name, out value))
347 {
348 try
349 {
350 Oid oid = Oid.FromFriendlyName(name, OidGroup.All);
351 value = oid.Value;
352 return value;
353 }
354 catch (CryptographicException)
355 {
356 }
357 }
358 return value;
359 }
static Dictionary< string, string > DefaultOidHT
static readonly ConcurrentDictionary< string, string > appOidHT

References System.Security.Cryptography.CryptoConfig.appOidHT, System.Security.Cryptography.CryptoConfig.DefaultOidHT, System.Security.Cryptography.Oid.FromFriendlyName(), and System.value.

Referenced by Internal.NativeCrypto.CapiHelper.NameOrOidToHashAlgId(), System.Security.Cryptography.RSAPKCS1SignatureDeformatter.SetHashAlgorithm(), and System.Security.Cryptography.RSAPKCS1SignatureFormatter.SetHashAlgorithm().