語言

ContentInfo 建構函式

定義

建立 ContentInfo 類別的執行個體。

多載

名稱 Description
ContentInfo(Byte[])

ContentInfo(Byte[])建構子透過使用一組位元組值陣列作為資料,並使用代表內容類型的預設物件識別碼(OID)來建立該ContentInfo類別的實例。

ContentInfo(Oid, Byte[])

ContentInfo(Oid, Byte[])建構子透過使用指定的內容型態與一組位元組值作為資料來建立該ContentInfo類別的實例。

ContentInfo(Byte[])

來源:
ContentInfo.cs
來源:
ContentInfo.cs
來源:
ContentInfo.cs
來源:
ContentInfo.cs
來源:
ContentInfo.cs
來源:
ContentInfo.cs
來源:
ContentInfo.cs
來源:
ContentInfo.cs

ContentInfo(Byte[])建構子透過使用一組位元組值陣列作為資料,並使用代表內容類型的預設物件識別碼(OID)來建立該ContentInfo類別的實例。

public:
 ContentInfo(cli::array <System::Byte> ^ content);
public ContentInfo(byte[] content);
new System.Security.Cryptography.Pkcs.ContentInfo : byte[] -> System.Security.Cryptography.Pkcs.ContentInfo
Public Sub New (content As Byte())

參數

content
Byte[]

一個位元組數陣列,代表用來建立 ContentInfo 物件的資料。

例外狀況

一個空引用被傳遞給一個不接受該參數為有效參數的方法。

備註

該 ContentInfo 類別具有以下預設屬性值。

房產 預設值
ContentType 1.2.840.113549.1.7.1 (data)

適用於

ContentInfo(Oid, Byte[])

來源:
ContentInfo.cs
來源:
ContentInfo.cs
來源:
ContentInfo.cs
來源:
ContentInfo.cs
來源:
ContentInfo.cs
來源:
ContentInfo.cs
來源:
ContentInfo.cs
來源:
ContentInfo.cs

ContentInfo(Oid, Byte[])建構子透過使用指定的內容型態與一組位元組值作為資料來建立該ContentInfo類別的實例。

public:
 ContentInfo(System::Security::Cryptography::Oid ^ contentType, cli::array <System::Byte> ^ content);
public ContentInfo(System.Security.Cryptography.Oid contentType, byte[] content);
new System.Security.Cryptography.Pkcs.ContentInfo : System.Security.Cryptography.Oid * byte[] -> System.Security.Cryptography.Pkcs.ContentInfo
Public Sub New (contentType As Oid, content As Byte())

參數

contentType
Oid

一個 Oid 包含 object identifier 指定內容類型(OID)的物件。 這可以是 data、digestedData、encryptedData、envelopedData、hashedData、signedAndEnvelopedData 或 signedData。 如需詳細資訊,請參閱備註。

content
Byte[]

一個位元組數陣列,代表用來建立 ContentInfo 物件的資料。

例外狀況

一個空引用被傳遞給一個不接受該參數為有效參數的方法。

備註

CMS/PKCS #7 標準文件中出現的 digestedData 與 encryptedData 內容類型,並非此實作可產生的內容類型。 然而,這些內容類型可以傳遞給這個建構子。

使用以下 OID 字串作為建 ContentInfo(Oid, Byte[]) 構子的參數,建立 contentType 內容型別參數。

contentType 內容類型 OID 字串
資料 1.2.840.113549.1.7.1
摘要資料 1.2.840.113549.1.7.5
加密資料 1.2.840.113549.1.7.6
envelopedData 1.2.840.113549.1.7.3
hashedData 1.2.840.113549.1.7.5
signedAndEnvelopedData 1.2.840.113549.1.7.4
signedData 1.2.840.113549.1.7.2

適用於