Språk

MLKem.GenerateKey(MLKemAlgorithm) Metod

Definition

Genererar en ny ML-KEM nyckel.

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

Parametrar

algorithm
MLKemAlgorithm

En algoritm som identifierar vilken typ av ML-KEM nyckel som ska genereras.

Returer

Den genererade nyckeln.

Undantag

algorithm är null.

Ett fel uppstod när nyckeln ML-KEM skulle genereras.

Plattformen stöder inte ML-KEM. Anropare kan använda egenskapen IsSupported för att avgöra om plattformen stöder ML-KEM.

Gäller för