System.Security.Cryptography.CryptoConfig.MapNameToOID C# (CSharp) Метод

MapNameToOID() публичный статический Метод

public static MapNameToOID ( string name ) : string
name string
Результат string
        public static string MapNameToOID(string name)
        {
            if (name == null)
                throw new ArgumentNullException(nameof(name));

            string oidName;
            if (!DefaultOidHT.TryGetValue(name, out oidName))
            {
                try
                {
                    Oid oid = Oid.FromFriendlyName(name, OidGroup.All);
                    oidName = oid.Value;
                }
                catch (CryptographicException) { }
            }

            return oidName;
        }
    }

Usage Example

Пример #1
0
 /// <summary>Sets the hash algorithm to use for creating the signature.</summary>
 /// <param name="strName">The name of the hash algorithm to use for creating the signature. </param>
 // Token: 0x06002310 RID: 8976 RVA: 0x0007DC18 File Offset: 0x0007BE18
 public override void SetHashAlgorithm(string strName)
 {
     this._strOID = CryptoConfig.MapNameToOID(strName, OidGroup.HashAlgorithm);
 }
All Usage Examples Of System.Security.Cryptography.CryptoConfig::MapNameToOID