Export Method (X509ContentType, String)
Collapse the table of content
Expand the table of content

X509Certificate2Collection.Export Method (X509ContentType, String)

 

Exports X.509 certificate information into a byte array using a password.

Namespace:   System.Security.Cryptography.X509Certificates
Assembly:  System (in System.dll)

public byte[] Export(
	X509ContentType contentType,
	string password
)

Parameters

contentType
Type: System.Security.Cryptography.X509Certificates.X509ContentType

A supported X509ContentType object.

password
Type: System.String

A string used to protect the byte array.

Return Value

Type: System.Byte[]

X.509 certificate information in a byte array.

Exception Condition
CryptographicException

The certificate is unreadable, the content is invalid or, in the case of a certificate requiring a password, the private key could not be exported because the password provided was incorrect.

This method supports the following X509ContentType types:

Universal Windows Platform
Available since 10
.NET Framework
Available since 2.0
Return to top
Show:
© 2016 Microsoft