X509Certificate2Collection.Export 方法

定义

基于内容类型将 X.509 证书信息导出到字节数组中。

重载

Export(X509ContentType, String)

使用密码将 X.509 证书信息导出到字节数组中。

Export(X509ContentType)

将 X.509 证书信息导出到字节数组中。

Export(X509ContentType, String)

Source:
X509Certificate2Collection.cs
Source:
X509Certificate2Collection.cs
Source:
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)

Source:
X509Certificate2Collection.cs
Source:
X509Certificate2Collection.cs
Source:
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 证书信息。

注解

此方法支持不需要密码的内容类型。

适用于