X509CertificateLoader.LoadCertificate Method

Definition

Overloads

LoadCertificate(Byte[])

Loads a single X.509 certificate from data, in either the PEM or DER encoding.

LoadCertificate(ReadOnlySpan<Byte>)

Loads a single X.509 certificate from data, in either the PEM or DER encoding.

LoadCertificate(Byte[])

Source:
X509CertificateLoader.netstandard.cs

Loads a single X.509 certificate from data, in either the PEM or DER encoding.

public:
 static System::Security::Cryptography::X509Certificates::X509Certificate2 ^ LoadCertificate(cli::array <System::Byte> ^ data);
public static System.Security.Cryptography.X509Certificates.X509Certificate2 LoadCertificate (byte[] data);
static member LoadCertificate : byte[] -> System.Security.Cryptography.X509Certificates.X509Certificate2
Public Shared Function LoadCertificate (data As Byte()) As X509Certificate2

Parameters

data
Byte[]

The data to load.

Returns

The certificate loaded from data.

Exceptions

data is null.

The data did not load as a valid X.509 certificate.

Remarks

This method only loads plain certificates, which are identified as Cert by GetCertContentType(Byte[])

See also

Applies to

LoadCertificate(ReadOnlySpan<Byte>)

Source:
X509CertificateLoader.netstandard.cs

Loads a single X.509 certificate from data, in either the PEM or DER encoding.

public:
 static System::Security::Cryptography::X509Certificates::X509Certificate2 ^ LoadCertificate(ReadOnlySpan<System::Byte> data);
public static System.Security.Cryptography.X509Certificates.X509Certificate2 LoadCertificate (ReadOnlySpan<byte> data);
static member LoadCertificate : ReadOnlySpan<byte> -> System.Security.Cryptography.X509Certificates.X509Certificate2
Public Shared Function LoadCertificate (data As ReadOnlySpan(Of Byte)) As X509Certificate2

Parameters

data
ReadOnlySpan<Byte>

The data to load.

Returns

The certificate loaded from data.

Exceptions

The data did not load as a valid X.509 certificate.

Remarks

This method only loads plain certificates, which are identified as Cert by GetCertContentType(Byte[])

See also

Applies to