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 中读取的字节数的值。 该参数未经初始化即被处理。

返回

表示 SubjectPublicKeyInfo 的公钥。

例外

无法解码 SubjectPublicKeyInfo。

适用于