MLKem.GenerateKey(MLKemAlgorithm) Metod
Definition
Viktigt
En del information gäller för förhandsversionen av en produkt och kan komma att ändras avsevärt innan produkten blir allmänt tillgänglig. Microsoft lämnar inga garantier, uttryckliga eller underförstådda, avseende informationen som visas här.
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.