RSACng.ImportParameters(RSAParameters) 方法
定義
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 參數。The RSA parameters.
例外狀況
parameters
並未包含指數和模數。parameters
contains neither an exponent nor a modulus.
parameters
不是有效的 RSA 金鑰。parameters
is not a valid RSA key.
-或--or-
parameters
是完整金鑰組並使用預設 KSP。parameters
is a full key pair and the default KSP is used.
備註
如果 parameters
只包含指數和模數,則只會匯入公開金鑰。If parameters
contains only an exponent and modulus, only a public key is imported. 如果 parameters
也包含 P 和 Q 值,就會匯入完整的金鑰組。If parameters
also contains P and Q values, a full key pair is imported.
此方法會使用指定的參數建立新的暫時 RSA 金鑰組象,並將值取代為 Key 新的索引鍵,任何已開啟的金鑰不會受到這個方法的影響。This method builds a new ephemeral RSA key object using the specified parameters and replaces the Key value with the new key, any already open key is unaffected by this method.