語言

MLKem.GenerateKey(MLKemAlgorithm) 方法

定義

會產生新的 ML-KEM 金鑰。

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

參數

algorithm
MLKemAlgorithm

一個用來識別要產生哪種 ML-KEM 金鑰的演算法。

傳回

生成的金鑰。

例外狀況

algorithm 是 null。

產生 ML-KEM 金鑰時發生錯誤。

該平台不支援 ML-KEM。 呼叫者可利用此 IsSupported 特性判斷平台是否支援 ML-KEM。

適用於