MLDsa.ImportMLDsaPrivateKey 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
| ImportMLDsaPrivateKey(MLDsaAlgorithm, ReadOnlySpan<Byte>) |
Imports an ML-DSA private key in the FIPS 204 private key format. |
| ImportMLDsaPrivateKey(MLDsaAlgorithm, Byte[]) |
Imports an ML-DSA private key in the FIPS 204 private key format. |
ImportMLDsaPrivateKey(MLDsaAlgorithm, ReadOnlySpan<Byte>)
- Source:
- MLDsa.cs
Imports an ML-DSA private key in the FIPS 204 private key format.
public:
static System::Security::Cryptography::MLDsa ^ ImportMLDsaPrivateKey(System::Security::Cryptography::MLDsaAlgorithm ^ algorithm, ReadOnlySpan<System::Byte> source);
public static System.Security.Cryptography.MLDsa ImportMLDsaPrivateKey(System.Security.Cryptography.MLDsaAlgorithm algorithm, ReadOnlySpan<byte> source);
static member ImportMLDsaPrivateKey : System.Security.Cryptography.MLDsaAlgorithm * ReadOnlySpan<byte> -> System.Security.Cryptography.MLDsa
Public Shared Function ImportMLDsaPrivateKey (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 private 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.
Applies to
ImportMLDsaPrivateKey(MLDsaAlgorithm, Byte[])
- Source:
- MLDsa.cs
Imports an ML-DSA private key in the FIPS 204 private key format.
public:
static System::Security::Cryptography::MLDsa ^ ImportMLDsaPrivateKey(System::Security::Cryptography::MLDsaAlgorithm ^ algorithm, cli::array <System::Byte> ^ source);
public static System.Security.Cryptography.MLDsa ImportMLDsaPrivateKey(System.Security.Cryptography.MLDsaAlgorithm algorithm, byte[] source);
static member ImportMLDsaPrivateKey : System.Security.Cryptography.MLDsaAlgorithm * byte[] -> System.Security.Cryptography.MLDsa
Public Shared Function ImportMLDsaPrivateKey (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 private key.
Returns
The imported key.
Exceptions
algorithm or source is null.