ECDiffieHellman.Create 方法

定义

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

重载

名称 说明
Create()

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

Create(ECCurve)

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

Create(ECParameters)

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

Create(String)
已过时.

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

Create()

Source:
ECDiffieHellman.Create.OpenSsl.cs
Source:
ECDiffieHellman.Create.OpenSsl.cs
Source:
ECDiffieHellman.Create.OpenSsl.cs
Source:
ECDiffieHellman.Create.OpenSsl.cs
Source:
ECDiffieHellman.Create.OpenSsl.cs

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

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

返回

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

属性

适用于

Create(ECCurve)

Source:
ECDiffieHellman.Create.OpenSsl.cs
Source:
ECDiffieHellman.Create.OpenSsl.cs
Source:
ECDiffieHellman.Create.OpenSsl.cs
Source:
ECDiffieHellman.Create.OpenSsl.cs
Source:
ECDiffieHellman.Create.OpenSsl.cs

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

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

参数

curve
ECCurve

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

返回

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

属性

例外

curve 不验证。

注解

曲线必须验证(即,传递给 ECCurve.Validate 方法时必须返回 true)。

Windows不支持特征 2 曲线。

另请参阅

适用于

Create(ECParameters)

Source:
ECDiffieHellman.Create.OpenSsl.cs
Source:
ECDiffieHellman.Create.OpenSsl.cs
Source:
ECDiffieHellman.Create.OpenSsl.cs
Source:
ECDiffieHellman.Create.OpenSsl.cs
Source:
ECDiffieHellman.Create.OpenSsl.cs

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

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

参数

parameters
ECParameters

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

返回

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

属性

例外

parameters 不验证。

注解

parameters 必须验证(即,必须返回 true)传递给 ECParameters.Validate 方法。 不支持隐式曲线上的参数。

Windows不支持特征 2 曲线。

另请参阅

适用于

Create(String)

Source:
ECDiffieHellman.cs
Source:
ECDiffieHellman.cs
Source:
ECDiffieHellman.cs
Source:
ECDiffieHellman.cs
Source:
ECDiffieHellman.cs

注意

Cryptographic factory methods accepting an algorithm name are obsolete. Use the parameterless Create factory method on the algorithm type instead.

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

public:
 static System::Security::Cryptography::ECDiffieHellman ^ Create(System::String ^ algorithm);
[System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("The default algorithm implementations might be removed, use strong type references like 'RSA.Create()' instead.")]
[System.Obsolete("Cryptographic factory methods accepting an algorithm name are obsolete. Use the parameterless Create factory method on the algorithm type instead.", DiagnosticId="SYSLIB0045", UrlFormat="https://aka.ms/dotnet-warnings/{0}")]
public static System.Security.Cryptography.ECDiffieHellman? Create(string algorithm);
public static System.Security.Cryptography.ECDiffieHellman? Create(string algorithm);
[System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("The default algorithm implementations might be removed, use strong type references like 'RSA.Create()' instead.")]
public static System.Security.Cryptography.ECDiffieHellman? Create(string algorithm);
public static System.Security.Cryptography.ECDiffieHellman Create(string algorithm);
[<System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("The default algorithm implementations might be removed, use strong type references like 'RSA.Create()' instead.")>]
[<System.Obsolete("Cryptographic factory methods accepting an algorithm name are obsolete. Use the parameterless Create factory method on the algorithm type instead.", DiagnosticId="SYSLIB0045", UrlFormat="https://aka.ms/dotnet-warnings/{0}")>]
static member Create : string -> System.Security.Cryptography.ECDiffieHellman
static member Create : string -> System.Security.Cryptography.ECDiffieHellman
[<System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("The default algorithm implementations might be removed, use strong type references like 'RSA.Create()' instead.")>]
static member Create : string -> System.Security.Cryptography.ECDiffieHellman
Public Shared Function Create (algorithm As String) As ECDiffieHellman

参数

algorithm
String

ECDH 算法实现的名称。

返回

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

属性

例外

参数 algorithmnull.

注解

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

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

  • “ECDH”

  • “ECDiffieHellman”

  • “ECDiffieHellmanCng”

  • “System.Security.Cryptography.ECDiffieHellmanCng”

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

适用于