Modifica

Condividi tramite


PublicKey.CreateFromSubjectPublicKeyInfo Method

Definition

Creates a new instance of PublicKey from a X.509 SubjectPublicKeyInfo.

public:
 static System::Security::Cryptography::X509Certificates::PublicKey ^ CreateFromSubjectPublicKeyInfo(ReadOnlySpan<System::Byte> source, [Runtime::InteropServices::Out] int % bytesRead);
public static System.Security.Cryptography.X509Certificates.PublicKey CreateFromSubjectPublicKeyInfo (ReadOnlySpan<byte> source, out int bytesRead);
static member CreateFromSubjectPublicKeyInfo : ReadOnlySpan<byte> * int -> System.Security.Cryptography.X509Certificates.PublicKey
Public Shared Function CreateFromSubjectPublicKeyInfo (source As ReadOnlySpan(Of Byte), ByRef bytesRead As Integer) As PublicKey

Parameters

source
ReadOnlySpan<Byte>

The bytes of an X.509 SubjectPublicKeyInfo structure in the ASN.1-DER encoding.

bytesRead
Int32

When this method returns, contains a value that indicates the number of bytes read from source. This parameter is treated as uninitialized.

Returns

A public key representing the SubjectPublicKeyInfo.

Exceptions

The SubjectPublicKeyInfo could not be decoded.

Applies to