ECDiffieHellman.Create 方法

定义

创建椭圆曲线 Diffie-Hellman (ECDH) 算法的实现的一个新实例。

重载

Create()

创建椭圆曲线 Diffie-Hellman (ECDH) 算法的默认实现的一个新实例。

Create(ECCurve)

使用通过指定曲线生成的新公钥/私钥对,创建椭圆曲线 Diffie-Hellman (ECDH) 算法的默认实现的新实例。

Create(ECParameters)

创建椭圆曲线 Diffie-Hellman (ECDH) 算法的默认实现的新实例,密钥由指定的 ECParameters 对象描述。

Create(String)

创建椭圆曲线 Diffie-hellman (ECDH) 算法的特定实现的新实例。

Create()

创建椭圆曲线 Diffie-Hellman (ECDH) 算法的默认实现的一个新实例。

public:
 static System::Security::Cryptography::ECDiffieHellman ^ Create();
public static System.Security.Cryptography.ECDiffieHellman Create ();
[System.Runtime.Versioning.UnsupportedOSPlatform("browser")]
public static System.Security.Cryptography.ECDiffieHellman Create ();
static member Create : unit -> System.Security.Cryptography.ECDiffieHellman
[<System.Runtime.Versioning.UnsupportedOSPlatform("browser")>]
static member Create : unit -> System.Security.Cryptography.ECDiffieHellman
Public Shared Function Create () As ECDiffieHellman

返回

ECDiffieHellman

此类的默认实现的一个新实例。

属性

适用于

Create(ECCurve)

使用通过指定曲线生成的新公钥/私钥对,创建椭圆曲线 Diffie-Hellman (ECDH) 算法的默认实现的新实例。

public:
 static System::Security::Cryptography::ECDiffieHellman ^ Create(System::Security::Cryptography::ECCurve curve);
public static System.Security.Cryptography.ECDiffieHellman Create (System.Security.Cryptography.ECCurve curve);
[System.Runtime.Versioning.UnsupportedOSPlatform("browser")]
public static System.Security.Cryptography.ECDiffieHellman Create (System.Security.Cryptography.ECCurve curve);
static member Create : System.Security.Cryptography.ECCurve -> System.Security.Cryptography.ECDiffieHellman
[<System.Runtime.Versioning.UnsupportedOSPlatform("browser")>]
static member Create : System.Security.Cryptography.ECCurve -> System.Security.Cryptography.ECDiffieHellman
Public Shared Function Create (curve As ECCurve) As ECDiffieHellman

参数

curve
ECCurve

用于生成新公钥/私钥对的曲线。

返回

ECDiffieHellman

椭圆曲线 Diffie-hellman (ECDH) 算法的默认实现的新实例。

属性

例外

curve 不进行验证。

注解

曲线必须验证 (,也就是说,传递给 ECCurve.Validate 方法时必须返回 true。

Windows不支持特征-2 曲线。

另请参阅

适用于

Create(ECParameters)

创建椭圆曲线 Diffie-Hellman (ECDH) 算法的默认实现的新实例,密钥由指定的 ECParameters 对象描述。

public:
 static System::Security::Cryptography::ECDiffieHellman ^ Create(System::Security::Cryptography::ECParameters parameters);
public static System.Security.Cryptography.ECDiffieHellman Create (System.Security.Cryptography.ECParameters parameters);
[System.Runtime.Versioning.UnsupportedOSPlatform("browser")]
public static System.Security.Cryptography.ECDiffieHellman Create (System.Security.Cryptography.ECParameters parameters);
static member Create : System.Security.Cryptography.ECParameters -> System.Security.Cryptography.ECDiffieHellman
[<System.Runtime.Versioning.UnsupportedOSPlatform("browser")>]
static member Create : System.Security.Cryptography.ECParameters -> System.Security.Cryptography.ECDiffieHellman
Public Shared Function Create (parameters As ECParameters) As ECDiffieHellman

参数

parameters
ECParameters

椭圆曲线加密 (ECC) 算法的参数。

返回

ECDiffieHellman

椭圆曲线 Diffie-hellman (ECDH) 算法的默认实现的新实例。

属性

例外

parameters 不进行验证。

注解

parameters必须验证 (,也就是说,它必须在传递给ECParameters.Validate方法时返回true) 。 不支持隐式曲线上的参数。

Windows不支持特征-2 曲线。

另请参阅

适用于

Create(String)

创建椭圆曲线 Diffie-hellman (ECDH) 算法的特定实现的新实例。

public:
 static System::Security::Cryptography::ECDiffieHellman ^ Create(System::String ^ algorithm);
public static System.Security.Cryptography.ECDiffieHellman? Create (string algorithm);
public static System.Security.Cryptography.ECDiffieHellman Create (string algorithm);
static member Create : string -> System.Security.Cryptography.ECDiffieHellman
Public Shared Function Create (algorithm As String) As ECDiffieHellman

参数

algorithm
String

ECDH 算法的实现的名称。

返回

ECDiffieHellman

此类的指定实现的新实例。 如果指定的算法名称未映射到 ECDH 实现,此方法将返回 null

例外

algorithm 参数为 null

注解

如果开发对象自己的实现 ECDiffieHellman ,则可以使用 Create(String) 方法重载创建一个指定实现的自定义 algorithm 字符串。

algorithm 参数指定 ECDH 算法实现的名称。 以下字符串都引用相同的实现,这是.NET Framework中当前唯一支持的实现:

  • “ECDH”

  • “ECDiffieHellman”

  • “ECDiffieHellmanCng”

  • “System.Security.Cryptography.ECDiffieHellmanCng”

还可以为参数提供自定义 ECDH 实现 algorithm 的名称。 如果这样做,该 CryptoConfig 对象将使用它来确定是否可以创建 ECDH 对象。

适用于