Share via


ECDiffieHellman.Create 方法

定義

建立 Elliptic Curve Diffie-Hellman (ECDH) 演算法實作的新執行個體。

多載

Create()

建立 Elliptic Curve Diffie-Hellman (ECDH) 演算法預設實作的新執行個體。

Create(ECCurve)

使用在指定曲線上產生的新公開/私密金鑰組,來建立橢圓曲線 Diffie-Hellman (ECDH) 演算法之預設實作的新執行個體。

Create(ECParameters)

使用指定 ECParameters 物件所指定的金鑰,來建立橢圓曲線 Diffie-Hellman (ECDH) 演算法之預設實作的新執行個體。

Create(String)

建立橢圓曲線 Diffie-Hellman (ECDH) 演算法的指定實作新執行個體。

Create()

建立 Elliptic Curve 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)

使用指定 ECParameters 物件所指定的金鑰,來建立橢圓曲線 Diffie-Hellman (ECDH) 演算法之預設實作的新執行個體。

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 物件。

適用於