This documentation is archived and is not being maintained.

CryptoConfig.MapNameToOID Method

Gets the object identifier (OID) of the algorithm corresponding to the specified simple name.

Namespace: System.Security.Cryptography
Assembly: mscorlib (in mscorlib.dll)

public static string MapNameToOID (
	string name
public static String MapNameToOID (
	String name
public static function MapNameToOID (
	name : String
) : String



The simple name of the algorithm for which to get the OID.

Return Value

The OID of the specified algorithm.

Exception typeCondition


The name parameter is a null reference (Nothing in Visual Basic).

For a list of simple names recognized by this class, see CryptoConfig.

The following code example demonstrates how to call the MapNameToOID method to retrieve an object identifier (OID) from the string name of the SHA1 algorithm. This code example is part of a larger example provided for the CryptoConfig class.

string sha1Oid = CryptoConfig.MapNameToOID("SHA1");

String sha1Oid = CryptoConfig.MapNameToOID("SHA1");

Windows 98, Windows 2000 SP4, Windows CE, Windows Millennium Edition, Windows Mobile for Pocket PC, Windows Mobile for Smartphone, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see System Requirements.

.NET Framework

Supported in: 2.0, 1.1, 1.0

.NET Compact Framework

Supported in: 2.0