X509Certificate2Collection.Export 方法

定義

將以內容類型為基礎的 X.509 憑證資訊匯出至位元組陣列。

多載

Export(X509ContentType, String)

使用密碼將 X.509 憑證資訊匯出至位元組陣列。

Export(X509ContentType)

將 X.509 憑證資訊匯出至位元組陣列。

Export(X509ContentType, String)

來源:
X509Certificate2Collection.cs
來源:
X509Certificate2Collection.cs
來源:
X509Certificate2Collection.cs

使用密碼將 X.509 憑證資訊匯出至位元組陣列。

public:
 cli::array <System::Byte> ^ Export(System::Security::Cryptography::X509Certificates::X509ContentType contentType, System::String ^ password);
public byte[]? Export (System.Security.Cryptography.X509Certificates.X509ContentType contentType, string? password);
public byte[] Export (System.Security.Cryptography.X509Certificates.X509ContentType contentType, string password);
member this.Export : System.Security.Cryptography.X509Certificates.X509ContentType * string -> byte[]
Public Function Export (contentType As X509ContentType, password As String) As Byte()

參數

contentType
X509ContentType

支援的 X509ContentType 物件。

password
String

用於保護位元組陣列的字串。

傳回

Byte[]

位元組陣列中的 X.509 憑證資訊。

例外狀況

無法讀取憑證、內容無效,或者在憑證需要密碼的情況下,因為提供的密碼不正確而無法匯出私密金鑰。

備註

這個方法支援下列X509ContentType類型:

適用於

Export(X509ContentType)

來源:
X509Certificate2Collection.cs
來源:
X509Certificate2Collection.cs
來源:
X509Certificate2Collection.cs

將 X.509 憑證資訊匯出至位元組陣列。

public:
 cli::array <System::Byte> ^ Export(System::Security::Cryptography::X509Certificates::X509ContentType contentType);
public byte[]? Export (System.Security.Cryptography.X509Certificates.X509ContentType contentType);
public byte[] Export (System.Security.Cryptography.X509Certificates.X509ContentType contentType);
member this.Export : System.Security.Cryptography.X509Certificates.X509ContentType -> byte[]
Public Function Export (contentType As X509ContentType) As Byte()

參數

contentType
X509ContentType

支援的 X509ContentType 物件。

傳回

Byte[]

位元組陣列中的 X.509 憑證資訊。

備註

此方法支援不需要密碼的內容類型。

適用於