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 新键,此方法不影响任何已打开的键。