CryptoConfig.EncodeOID(String) Method

Definition

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()

Parameters

str
String

The OID to encode.

Returns

Byte[]

A byte array containing the encoded OID.

Exceptions

The str parameter is null.

An error occurred while encoding the OID.

Examples

The following code example demonstrates how to call the EncodeOID method to encode the specified object identifier. 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)

Applies to

See also