X509Certificate.Import Method (Byte[])

 

Populates the X509Certificate object with data from a byte array.

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

[SecurityCriticalAttribute]
[ComVisibleAttribute(false)]
[PermissionSetAttribute(SecurityAction.InheritanceDemand, Unrestricted = true)]
public virtual void Import(
	byte[] rawData
)

Parameters

rawData
Type: System.Byte[]

A byte array containing data from an X.509 certificate.

Exception Condition
ArgumentException

The rawData parameter is null.

-or-

The length of the rawData parameter is 0.

This method can be used to take the raw byte array of an X.509 certificate and populate the X509Certificate object with its associated values.

SecurityCriticalAttribute

requires full trust for the immediate caller. This class cannot be used by partially trusted or transparent code.

InheritanceDemand

for full trust for inheritors. This member cannot be inherited by partially trusted code.

KeyContainerPermission

for permission to create a key container. Security action: Demand. Associated enumeration: KeyContainerPermissionFlags.Create

.NET Framework
Available since 2.0
Silverlight
Available since 2.0
Windows Phone Silverlight
Available since 7.0
Return to top
Show: