MLDsa.ImportSubjectPublicKeyInfo Method     
Definition
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.
Overloads
| ImportSubjectPublicKeyInfo(ReadOnlySpan<Byte>) | Imports an ML-DSA public key from an X.509 SubjectPublicKeyInfo structure. | 
| ImportSubjectPublicKeyInfo(Byte[]) | Imports an ML-DSA public key from an X.509 SubjectPublicKeyInfo structure. | 
ImportSubjectPublicKeyInfo(ReadOnlySpan<Byte>)
- Source:
- MLDsa.cs
- Source:
- MLDsa.cs
Imports an ML-DSA public key from an X.509 SubjectPublicKeyInfo structure.
public:
 static System::Security::Cryptography::MLDsa ^ ImportSubjectPublicKeyInfo(ReadOnlySpan<System::Byte> source);[System.Diagnostics.CodeAnalysis.Experimental("SYSLIB5006", UrlFormat="https://aka.ms/dotnet-warnings/{0}")]
public static System.Security.Cryptography.MLDsa ImportSubjectPublicKeyInfo(ReadOnlySpan<byte> source);public static System.Security.Cryptography.MLDsa ImportSubjectPublicKeyInfo(ReadOnlySpan<byte> source);[<System.Diagnostics.CodeAnalysis.Experimental("SYSLIB5006", UrlFormat="https://aka.ms/dotnet-warnings/{0}")>]
static member ImportSubjectPublicKeyInfo : ReadOnlySpan<byte> -> System.Security.Cryptography.MLDsastatic member ImportSubjectPublicKeyInfo : ReadOnlySpan<byte> -> System.Security.Cryptography.MLDsaPublic Shared Function ImportSubjectPublicKeyInfo (source As ReadOnlySpan(Of Byte)) As MLDsaParameters
- source
- ReadOnlySpan<Byte>
The bytes of an X.509 SubjectPublicKeyInfo structure in the ASN.1-DER encoding.
Returns
The imported key.
- Attributes
Exceptions
The contents of source do not represent an ASN.1-DER-encoded X.509 SubjectPublicKeyInfo structure.
-or-
The SubjectPublicKeyInfo value does not represent an ML-DSA key.
-or-
  source contains trailing data after the ASN.1 structure.
-or-
The algorithm-specific import failed.
The platform does not support ML-DSA. Callers can use the IsSupported property to determine if the platform supports ML-DSA.
Applies to
ImportSubjectPublicKeyInfo(Byte[])
- Source:
- MLDsa.cs
Imports an ML-DSA public key from an X.509 SubjectPublicKeyInfo structure.
public:
 static System::Security::Cryptography::MLDsa ^ ImportSubjectPublicKeyInfo(cli::array <System::Byte> ^ source);[System.Diagnostics.CodeAnalysis.Experimental("SYSLIB5006", UrlFormat="https://aka.ms/dotnet-warnings/{0}")]
public static System.Security.Cryptography.MLDsa ImportSubjectPublicKeyInfo(byte[] source);public static System.Security.Cryptography.MLDsa ImportSubjectPublicKeyInfo(byte[] source);[<System.Diagnostics.CodeAnalysis.Experimental("SYSLIB5006", UrlFormat="https://aka.ms/dotnet-warnings/{0}")>]
static member ImportSubjectPublicKeyInfo : byte[] -> System.Security.Cryptography.MLDsastatic member ImportSubjectPublicKeyInfo : byte[] -> System.Security.Cryptography.MLDsaPublic Shared Function ImportSubjectPublicKeyInfo (source As Byte()) As MLDsaParameters
- source
- Byte[]
The bytes of an X.509 SubjectPublicKeyInfo structure in the ASN.1-DER encoding.
Returns
The imported key.
- Attributes
Exceptions
source is null.