ECDiffieHellmanCng.GenerateKey(ECCurve) 方法

定义

为指定曲线生成新的临时公钥/私钥对。Generates a new ephemeral public/private key pair for the specified curve.

public:
 override void GenerateKey(System::Security::Cryptography::ECCurve curve);
public override void GenerateKey (System.Security.Cryptography.ECCurve curve);
override this.GenerateKey : System.Security.Cryptography.ECCurve -> unit
Public Overrides Sub GenerateKey (curve As ECCurve)

参数

curve
ECCurve

用于生成临时公钥/私钥对的曲线。The curve used to generate an ephemeral public/private key pair.

异常

curve 不进行验证。curve does not validate.

注解

必须验证 curve (即,在传递到 ECCurve.Validate 方法时,它必须返回 true),并且不能是隐式的。curve must validate (that is, it must return true when passed to the ECCurve.Validate method) and must not be implicit.

在 Windows 上不支持特性2曲线。Characteristic-2 curves are not supported on Windows.

适用于