MLDsa.ImportMLDsaPublicKey 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
| ImportMLDsaPublicKey(MLDsaAlgorithm, Byte[]) |
Imports an ML-DSA public key in the FIPS 204 public key format. |
| ImportMLDsaPublicKey(MLDsaAlgorithm, ReadOnlySpan<Byte>) |
Imports an ML-DSA public key in the FIPS 204 public key format. |
ImportMLDsaPublicKey(MLDsaAlgorithm, Byte[])
- Source:
- MLDsa.cs
Imports an ML-DSA public key in the FIPS 204 public key format.
public:
static System::Security::Cryptography::MLDsa ^ ImportMLDsaPublicKey(System::Security::Cryptography::MLDsaAlgorithm ^ algorithm, cli::array <System::Byte> ^ source);
public static System.Security.Cryptography.MLDsa ImportMLDsaPublicKey(System.Security.Cryptography.MLDsaAlgorithm algorithm, byte[] source);
static member ImportMLDsaPublicKey : System.Security.Cryptography.MLDsaAlgorithm * byte[] -> System.Security.Cryptography.MLDsa
Public Shared Function ImportMLDsaPublicKey (algorithm As MLDsaAlgorithm, source As Byte()) As MLDsa
Parameters
- algorithm
- MLDsaAlgorithm
The specific ML-DSA algorithm for this key.
- source
- Byte[]
The bytes of a FIPS 204 public key.
Returns
The imported key.
Exceptions
algorithm or source is null.
Applies to
ImportMLDsaPublicKey(MLDsaAlgorithm, ReadOnlySpan<Byte>)
- Source:
- MLDsa.cs
- Source:
- MLDsa.cs
Imports an ML-DSA public key in the FIPS 204 public key format.
public:
static System::Security::Cryptography::MLDsa ^ ImportMLDsaPublicKey(System::Security::Cryptography::MLDsaAlgorithm ^ algorithm, ReadOnlySpan<System::Byte> source);
public static System.Security.Cryptography.MLDsa ImportMLDsaPublicKey(System.Security.Cryptography.MLDsaAlgorithm algorithm, ReadOnlySpan<byte> source);
static member ImportMLDsaPublicKey : System.Security.Cryptography.MLDsaAlgorithm * ReadOnlySpan<byte> -> System.Security.Cryptography.MLDsa
Public Shared Function ImportMLDsaPublicKey (algorithm As MLDsaAlgorithm, source As ReadOnlySpan(Of Byte)) As MLDsa
Parameters
- algorithm
- MLDsaAlgorithm
The specific ML-DSA algorithm for this key.
- source
- ReadOnlySpan<Byte>
The bytes of a FIPS 204 public key.
Returns
The imported key.
Exceptions
algorithm is not a valid ML-DSA algorithm identifier.
-or-
source is not the correct size for the specified algorithm.
-or-
An error occurred while importing the key.