MLKem.GenerateKey(MLKemAlgorithm) 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.
Generates a new ML-KEM key.
public:
static System::Security::Cryptography::MLKem ^ GenerateKey(System::Security::Cryptography::MLKemAlgorithm ^ algorithm);
public static System.Security.Cryptography.MLKem GenerateKey(System.Security.Cryptography.MLKemAlgorithm algorithm);
static member GenerateKey : System.Security.Cryptography.MLKemAlgorithm -> System.Security.Cryptography.MLKem
Public Shared Function GenerateKey (algorithm As MLKemAlgorithm) As MLKem
Parameters
- algorithm
- MLKemAlgorithm
An algorithm identifying what kind of ML-KEM key to generate.
Returns
The generated key.
Exceptions
algorithm is null.
An error occurred generating the ML-KEM key.
The platform does not support ML-KEM. Callers can use the IsSupported property to determine if the platform supports ML-KEM.