CryptoConfig.MapNameToOID(String) CryptoConfig.MapNameToOID(String) CryptoConfig.MapNameToOID(String) CryptoConfig.MapNameToOID(String) Method

定义

获取与指定的简单名称对应的算法的对象标识符 (OID)。Gets the object identifier (OID) of the algorithm corresponding to the specified simple name.

public:
 static System::String ^ MapNameToOID(System::String ^ name);
public static string MapNameToOID (string name);
static member MapNameToOID : string -> string
Public Shared Function MapNameToOID (name As String) As String

参数

name
String String String String

获取其 OID 的算法的简单名称。The simple name of the algorithm for which to get the OID.

返回

指定算法的 OID。The OID of the specified algorithm.

异常

示例

下面的代码示例演示如何调用MapNameToOID方法,以便从 SHA1 算法的字符串名称检索对象标识符(OID)。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. 此代码示例是为CryptoConfig类提供的更大示例的一部分。This code example is part of a larger example provided for the CryptoConfig class.

String^ sha1Oid = CryptoConfig::MapNameToOID( L"SHA1" );
string sha1Oid = CryptoConfig.MapNameToOID("SHA1");
' (OID) from the string name of the SHA1 algorithm.
Dim sha1Oid As String = cryptoConfig.MapNameToOID("SHA1")

注解

有关此类识别的简单名称的列表,请参见CryptoConfigFor a list of simple names recognized by this class, see CryptoConfig.

适用于

另请参阅