MLKem.GenerateKey(MLKemAlgorithm) 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
會產生新的 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。