System.Security.Cryptography.X509Certificates.X509Certificate.Import Method

Populates the System.Security.Cryptography.X509Certificates.X509Certificate object using data from a byte array, a password, and flags for determining how the private key is imported.

Syntax

[System.Runtime.InteropServices.ComVisible(false)]
public virtual void Import (byte[] rawData, string password, X509KeyStorageFlags keyStorageFlags)

Parameters

rawData
A byte array containing data from an X.509 certificate.
password
The password required to access the X.509 certificate data.
keyStorageFlags
A bitwise combination of the enumeration values that control where and how to import the certificate.

Remarks

This method can be used to populate an System.Security.Cryptography.X509Certificates.X509Certificate object using a password for the certificate represented by the byte array. The System.Security.Cryptography.X509Certificates.X509KeyStorageFlags value can be used to control where and how the private key is imported.

Requirements

Namespace: System.Security.Cryptography.X509Certificates
Assembly: mscorlib (in mscorlib.dll)
Assembly Versions: 2.0.0.0, 4.0.0.0
Since: .NET 2.0