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

Populates an System.Security.Cryptography.X509Certificates.X509Certificate object using data from a byte array, a password, and a key storage flag.

Syntax

public virtual void Import (byte[] rawData, System.Security.SecureString password, X509KeyStorageFlags keyStorageFlags)

Parameters

rawData
A byte array that contains 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

Note:

Never hard code a password within your source code. Hard-coded passwords can be retrieved from an assembly using the MSIL Disassembler (Ildasm.exe), a hex editor, or by simply opening the assembly in a text editor such as Notepad.exe.

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