X509Certificate::Import Method (array<Byte>^)

 
System_CAPS_noteNote

The .NET API Reference documentation has a new home. Visit the .NET API Browser on docs.microsoft.com to see the new experience.

Populates the X509Certificate object with data from a byte array.

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

public:
[SecurityCriticalAttribute]
[ComVisibleAttribute(false)]
[PermissionSetAttribute(SecurityAction::InheritanceDemand, Unrestricted = true)]
virtual void Import(
	array<unsigned char>^ rawData
)

Parameters

rawData
Type: array<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: