Ask Learn
Preview
Ask Learn is an AI assistant that can answer questions, clarify concepts, and define terms using trusted Microsoft documentation.
Please sign in to use Ask Learn.
Sign inThis browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Imports the public key from an X.509 SubjectPublicKeyInfo structure after decryption, replacing the keys for this object.
public:
override void ImportSubjectPublicKeyInfo(ReadOnlySpan<System::Byte> source, [Runtime::InteropServices::Out] int % bytesRead);
public override void ImportSubjectPublicKeyInfo(ReadOnlySpan<byte> source, out int bytesRead);
override this.ImportSubjectPublicKeyInfo : ReadOnlySpan<byte> * int -> unit
Public Overrides Sub ImportSubjectPublicKeyInfo (source As ReadOnlySpan(Of Byte), ByRef bytesRead As Integer)
The bytes of an X.509 SubjectPublicKeyInfo structure in the ASN.1-DER encoding.
When this method returns, contains a value that indicates the number of bytes read from source
. This parameter is treated as uninitialized.
The contents of source
do not represent an ASN.1-DER-encoded X.509 SubjectPublicKeyInfo structure.
-or-
The contents of source
indicate the key is for an algorithm other than the algorithm represented by this instance.
-or-
The contents of source
represent the key in a format that is not supported.
-or-
The algorithm-specific key import failed.
This method only supports the binary (DER) encoding of SubjectPublicKeyInfo. If the value is Base64-encoded or in the PEM text format, the caller must Base64-decode the contents before calling this method.
Product | Versions |
---|---|
.NET | Core 3.0, Core 3.1, 5, 6, 7, 8, 9, 10 |
.NET feedback
.NET is an open source project. Select a link to provide feedback:
Ask Learn is an AI assistant that can answer questions, clarify concepts, and define terms using trusted Microsoft documentation.
Please sign in to use Ask Learn.
Sign in