共用方式為


ContentInfo 建構函式

定義

建立 ContentInfo 類別的執行個體。

多載

ContentInfo(Byte[])

ContentInfo(Byte[])構函式會使用位元組值的數位作為數據,以及代表內容類型的預設 object identifier (OID) ,來建立 類別的實例ContentInfo

ContentInfo(Oid, Byte[])

ContentInfo(Oid, Byte[]) 構函式會使用指定的內容類型和位元元組值的陣列作為數據,建立類別的實例 ContentInfo

ContentInfo(Byte[])

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

ContentInfo(Byte[])構函式會使用位元組值的數位作為數據,以及代表內容類型的預設 object identifier (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 物件的資料。

例外狀況

Null 參考已傳遞至不接受它做為有效引數的方法。

備註

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

屬性 預設值
ContentType 1.2.840.113549.1.7.1 (數據)

適用於

ContentInfo(Oid, Byte[])

來源:
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 物件的資料。

例外狀況

Null 參考已傳遞至不接受它做為有效引數的方法。

備註

digestedData 和 encryptedData 內容類型出現在 CMS/PKCS #7 標準檔中,不是此實作所產生的內容類型。 不過,這些內容類型可以傳遞至這個建構函式。

使用下列 OID 字串作為建構函式的 ContentInfo(Oid, Byte[]) 自變數,以建置 contentType 內容類型參數。

contentType 內容類型 OID 字串
資料 1.2.840.113549.1.7.1
digestedData 1.2.840.113549.1.7.5
encryptedData 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

適用於