ContentInfo.GetContentType 方法

定义

重载

GetContentType(Byte[])

检索编码的 CMS ContentInfo 消息的外部内容类型。

GetContentType(ReadOnlySpan<Byte>)

检索编码的 CMS ContentInfo 消息的外部内容类型。

GetContentType(Byte[])

检索编码的 CMS ContentInfo 消息的外部内容类型。

public:
 static System::Security::Cryptography::Oid ^ GetContentType(cli::array <System::Byte> ^ encodedMessage);
public static System.Security.Cryptography.Oid GetContentType (byte[] encodedMessage);
static member GetContentType : byte[] -> System.Security.Cryptography.Oid
Public Shared Function GetContentType (encodedMessage As Byte()) As Oid

参数

encodedMessage
Byte[]

一个字节值数组,表示要从中检索外部内容类型的编码的 CMS ContentInfo 消息。

返回

Oid

指定的编码 CMS ContentInfo 消息的外部内容类型。

例外

encodedMessage 上声明的默认值为 null

encodedMessage 无法解码为有效的 CMS ContentInfo 值。

适用于

GetContentType(ReadOnlySpan<Byte>)

检索编码的 CMS ContentInfo 消息的外部内容类型。

public:
 static System::Security::Cryptography::Oid ^ GetContentType(ReadOnlySpan<System::Byte> encodedMessage);
public static System.Security.Cryptography.Oid GetContentType (ReadOnlySpan<byte> encodedMessage);
static member GetContentType : ReadOnlySpan<byte> -> System.Security.Cryptography.Oid
Public Shared Function GetContentType (encodedMessage As ReadOnlySpan(Of Byte)) As Oid

参数

encodedMessage
ReadOnlySpan<Byte>

字节值的一个只读范围,表示要从中检索外部内容类型的编码的 CMS ContentInfo 消息。

返回

Oid

指定的编码 CMS ContentInfo 消息的外部内容类型。

例外

encodedMessage 无法解码为有效的 CMS ContentInfo 值。

适用于