共用方式為


PublicKey.CreateFromSubjectPublicKeyInfo 方法

定義

從 X.509 SubjectPublicKeyInfo 建立 的新實例 PublicKey

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

參數

source
ReadOnlySpan<Byte>

以 ASN.1-DER 編碼的 X.509 SubjectPublicKeyInfo 結構位元組。

bytesRead
Int32

當此方法傳回時,會包含一個值,指出讀取自 source 的位元組數。 這個參數會被視為未初始化。

傳回

PublicKey

代表 SubjectPublicKeyInfo 的公開金鑰。

例外狀況

無法解碼 SubjectPublicKeyInfo。

適用於