Edit

Share via


MLDsa.ImportSubjectPublicKeyInfo Method

Definition

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.MLDsa
static member ImportSubjectPublicKeyInfo : ReadOnlySpan<byte> -> System.Security.Cryptography.MLDsa
Public Shared Function ImportSubjectPublicKeyInfo (source As ReadOnlySpan(Of Byte)) As MLDsa

Parameters

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.MLDsa
static member ImportSubjectPublicKeyInfo : byte[] -> System.Security.Cryptography.MLDsa
Public Shared Function ImportSubjectPublicKeyInfo (source As Byte()) As MLDsa

Parameters

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.

Applies to