Edit

Share via


MLDsa.GenerateKey(MLDsaAlgorithm) Method

Definition

Generates a new ML-DSA key.

public:
 static System::Security::Cryptography::MLDsa ^ GenerateKey(System::Security::Cryptography::MLDsaAlgorithm ^ algorithm);
public static System.Security.Cryptography.MLDsa GenerateKey(System.Security.Cryptography.MLDsaAlgorithm algorithm);
static member GenerateKey : System.Security.Cryptography.MLDsaAlgorithm -> System.Security.Cryptography.MLDsa
Public Shared Function GenerateKey (algorithm As MLDsaAlgorithm) As MLDsa

Parameters

algorithm
MLDsaAlgorithm

An algorithm identifying what kind of ML-DSA key to generate.

Returns

The generated key.

Exceptions

algorithm is null

An error occured generating the ML-DSA key.

The platform does not support ML-DSA. Callers can use the IsSupported property to determine if the platform supports ML-DSA.

Applies to