Gets the object identifier (OID) of the algorithm corresponding to the specified simple name.
Namespace:
System.Security.Cryptography
Assembly:
mscorlib (in mscorlib.dll)
Visual Basic (Declaration)
Public Shared Function MapNameToOID ( _
name As String _
) As String
Dim name As String
Dim returnValue As String
returnValue = CryptoConfig.MapNameToOID(name)
public static string MapNameToOID(
string name
)
public:
static String^ MapNameToOID(
String^ name
)
public static function MapNameToOID(
name : String
) : String
Parameters
- name
- Type: System..::.String
The simple name of the algorithm for which to get the OID.
| Exception | Condition |
|---|
| ArgumentNullException | The name parameter is nullNothingnullptra 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.
' (OID) from the string name of the SHA1 algorithm.
Dim sha1Oid As String = cryptoConfig.MapNameToOID("SHA1")
string sha1Oid = CryptoConfig.MapNameToOID("SHA1");
String^ sha1Oid = CryptoConfig::MapNameToOID( L"SHA1" );
Windows 7, Windows Vista, Windows XP SP2, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP Starter Edition, Windows Server 2008 R2, Windows Server 2008, Windows Server 2003, Windows Server 2000 SP4, Windows Millennium Edition, Windows 98, Windows CE, Windows Mobile for Smartphone, Windows Mobile for Pocket PC
The .NET Framework and .NET Compact Framework do not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.
.NET Framework
Supported in: 3.5, 3.0, 2.0, 1.1, 1.0
.NET Compact Framework
Supported in: 3.5, 2.0
Reference
Other Resources