CryptoConfig.EncodeOID(String) CryptoConfig.EncodeOID(String) CryptoConfig.EncodeOID(String) CryptoConfig.EncodeOID(String) Method

定义

对指定的对象标识符 (OID) 进行编码。Encodes the specified object identifier (OID).

public:
 static cli::array <System::Byte> ^ EncodeOID(System::String ^ str);
public static byte[] EncodeOID (string str);
static member EncodeOID : string -> byte[]
Public Shared Function EncodeOID (str As String) As Byte()

参数

str
String String String String

要进行编码的 OID。The OID to encode.

返回

Byte[]

包含编码 OID 的字节数组。A byte array containing the encoded OID.

异常

示例

下面的代码示例演示如何调用EncodeOID方法对指定的对象标识符进行编码。The following code example demonstrates how to call the EncodeOID method to encode the specified object identifier. 此代码示例是为CryptoConfig类提供的更大示例的一部分。This code example is part of a larger example provided for the CryptoConfig class.

array<Byte>^encodedMessage = CryptoConfig::EncodeOID( sha1Oid );

byte[] encodedMessage = CryptoConfig.EncodeOID(sha1Oid);
Dim encodedMessage() As Byte = cryptoConfig.EncodeOID(sha1Oid)

适用于

另请参阅