System.Security.Cryptography.Oid.FromFriendlyName C# (CSharp) Method

FromFriendlyName() public static method

public static FromFriendlyName ( string friendlyName, System group ) : System.Security.Cryptography.Oid
friendlyName string
group System
return System.Security.Cryptography.Oid
        public static System.Security.Cryptography.Oid FromFriendlyName(string friendlyName, System.Security.Cryptography.OidGroup group)
        {
            throw null;
        }

Usage Example

Example #1
0
        public static string MapNameToOID(string name)
        {
            if (name == null)
            {
                throw new ArgumentNullException(nameof(name));
            }

            string oidName;

            // Check to see if we have an application defined mapping
            lock (s_InternalSyncObject)
            {
                if (!appOidHT.TryGetValue(name, out oidName))
                {
                    oidName = null;
                }
            }

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

            return(oidName);
        }
All Usage Examples Of System.Security.Cryptography.Oid::FromFriendlyName