RSACng.ImportParameters(RSAParameters) 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
替換目前實例正在使用的現有鍵,為參數結構建立新 CngKey 鍵。
public:
override void ImportParameters(System::Security::Cryptography::RSAParameters parameters);
public override void ImportParameters(System.Security.Cryptography.RSAParameters parameters);
override this.ImportParameters : System.Security.Cryptography.RSAParameters -> unit
Public Overrides Sub ImportParameters (parameters As RSAParameters)
參數
- parameters
- RSAParameters
RSA參數。
例外狀況
parameters 不包含指數或模數。
備註
若 parameters 僅包含指數與模數,則僅匯入公鑰。 若 parameters 也包含 P 與 Q 值,則匯入完整金鑰對。
此方法會使用指定的參數建立一個新的臨時 RSA 金鑰物件,並將該值替換 Key 為新金鑰,任何已開啟的金鑰都不受此方法影響。