ECDiffieHellmanOpenSsl 建構函式

定義

多載

ECDiffieHellmanOpenSsl()

使用 NIST P-521/secp521r1 的預設曲線,初始化 ECDiffieHellmanOpenSsl 類別的新執行個體。

ECDiffieHellmanOpenSsl(Int32)

初始化 ECDiffieHellmanOpenSsl 類別的新執行個體,其預設為指定大小的 NIST 質數曲線。

ECDiffieHellmanOpenSsl(IntPtr)

從表示為 EC_KEY* 的現有 OpenSSL 索引鍵, ECDiffieHellmanOpenSsl 初始化 類別的新實例。

ECDiffieHellmanOpenSsl(ECCurve)

初始化 ECDiffieHellmanOpenSsl 類別的新執行個體,並依據所指定曲線產生新金鑰。

ECDiffieHellmanOpenSsl(SafeEvpPKeyHandle)

從表示為 EVP_PKEY* 的現有 OpenSSL 索引鍵, ECDiffieHellmanOpenSsl 初始化 類別的新實例。

ECDiffieHellmanOpenSsl()

來源:
ECDiffieHellmanOpenSsl.cs
來源:
ECDiffieHellmanOpenSsl.cs
來源:
ECDiffieHellmanOpenSsl.cs

使用 NIST P-521/secp521r1 的預設曲線,初始化 ECDiffieHellmanOpenSsl 類別的新執行個體。

public:
 ECDiffieHellmanOpenSsl();
public ECDiffieHellmanOpenSsl ();
[System.Runtime.Versioning.UnsupportedOSPlatform("android")]
[System.Runtime.Versioning.UnsupportedOSPlatform("browser")]
[System.Runtime.Versioning.UnsupportedOSPlatform("ios")]
[System.Runtime.Versioning.UnsupportedOSPlatform("tvos")]
[System.Runtime.Versioning.UnsupportedOSPlatform("windows")]
public ECDiffieHellmanOpenSsl ();
Public Sub New ()
屬性

備註

此建構函式不會立即產生新的公開/私密金鑰,它只會設定大小,以在需要金鑰時用來產生金鑰。 如果索引鍵是透過 ImportParameters 方法載入或其他索引鍵匯入方法,則來自這個建構函式的金鑰大小並無意義。

另請參閱

適用於

ECDiffieHellmanOpenSsl(Int32)

來源:
ECDiffieHellmanOpenSsl.cs
來源:
ECDiffieHellmanOpenSsl.cs
來源:
ECDiffieHellmanOpenSsl.cs

初始化 ECDiffieHellmanOpenSsl 類別的新執行個體,其預設為指定大小的 NIST 質數曲線。

public:
 ECDiffieHellmanOpenSsl(int keySize);
public ECDiffieHellmanOpenSsl (int keySize);
[System.Runtime.Versioning.UnsupportedOSPlatform("android")]
[System.Runtime.Versioning.UnsupportedOSPlatform("browser")]
[System.Runtime.Versioning.UnsupportedOSPlatform("ios")]
[System.Runtime.Versioning.UnsupportedOSPlatform("tvos")]
[System.Runtime.Versioning.UnsupportedOSPlatform("windows")]
public ECDiffieHellmanOpenSsl (int keySize);
new System.Security.Cryptography.ECDiffieHellmanOpenSsl : int -> System.Security.Cryptography.ECDiffieHellmanOpenSsl
[<System.Runtime.Versioning.UnsupportedOSPlatform("android")>]
[<System.Runtime.Versioning.UnsupportedOSPlatform("browser")>]
[<System.Runtime.Versioning.UnsupportedOSPlatform("ios")>]
[<System.Runtime.Versioning.UnsupportedOSPlatform("tvos")>]
[<System.Runtime.Versioning.UnsupportedOSPlatform("windows")>]
new System.Security.Cryptography.ECDiffieHellmanOpenSsl : int -> System.Security.Cryptography.ECDiffieHellmanOpenSsl
Public Sub New (keySize As Integer)

參數

keySize
Int32

需要金鑰時,所要產生的金鑰大小。

屬性

例外狀況

這個實作不支援 keySize 值。

備註

此建構函式僅支援三個主要大小:256 (NIST P-256/secp256r1) 、384 (NIST P-384/secp384r1) ,以及 521 (NIST P-521/secp521r1) 。 若要產生任何其他曲線的索引鍵,請使用 建 ECDiffieHellmanOpenSsl(ECCurve) 構函式或 GenerateKey(ECCurve) 方法。

此建構函式不會立即產生新的公開/私密金鑰,它只會設定大小,以在需要金鑰時用來產生金鑰。 如果索引鍵是透過 ImportParameters 方法載入或其他索引鍵匯入方法,則來自這個建構函式的金鑰大小並無意義。

另請參閱

適用於

ECDiffieHellmanOpenSsl(IntPtr)

來源:
ECDiffieHellmanOpenSsl.cs
來源:
ECDiffieHellmanOpenSsl.cs
來源:
ECDiffieHellmanOpenSsl.cs

從表示為 EC_KEY* 的現有 OpenSSL 索引鍵, ECDiffieHellmanOpenSsl 初始化 類別的新實例。

public:
 ECDiffieHellmanOpenSsl(IntPtr handle);
public ECDiffieHellmanOpenSsl (IntPtr handle);
[System.Runtime.Versioning.UnsupportedOSPlatform("android")]
[System.Runtime.Versioning.UnsupportedOSPlatform("browser")]
[System.Runtime.Versioning.UnsupportedOSPlatform("ios")]
[System.Runtime.Versioning.UnsupportedOSPlatform("tvos")]
[System.Runtime.Versioning.UnsupportedOSPlatform("windows")]
public ECDiffieHellmanOpenSsl (IntPtr handle);
new System.Security.Cryptography.ECDiffieHellmanOpenSsl : nativeint -> System.Security.Cryptography.ECDiffieHellmanOpenSsl
[<System.Runtime.Versioning.UnsupportedOSPlatform("android")>]
[<System.Runtime.Versioning.UnsupportedOSPlatform("browser")>]
[<System.Runtime.Versioning.UnsupportedOSPlatform("ios")>]
[<System.Runtime.Versioning.UnsupportedOSPlatform("tvos")>]
[<System.Runtime.Versioning.UnsupportedOSPlatform("windows")>]
new System.Security.Cryptography.ECDiffieHellmanOpenSsl : nativeint -> System.Security.Cryptography.ECDiffieHellmanOpenSsl
Public Sub New (handle As IntPtr)

參數

handle
IntPtr

nativeint

要作為索引鍵使用的 OpenSSL EC_KEY* 值。

屬性

例外狀況

handleZero

handle 不是有效的 EC_KEY*

備註

重要

OpenSSL 支援在同一個進程中載入多個程式庫版本。 呼叫此建構函式之前,請確認指標值來自這個類別所使用的相同 OpenSSL 版本。 如需詳細資訊,請參閱OpenSslVersion

另請參閱

適用於

ECDiffieHellmanOpenSsl(ECCurve)

來源:
ECDiffieHellmanOpenSsl.cs
來源:
ECDiffieHellmanOpenSsl.cs
來源:
ECDiffieHellmanOpenSsl.cs

初始化 ECDiffieHellmanOpenSsl 類別的新執行個體,並依據所指定曲線產生新金鑰。

public:
 ECDiffieHellmanOpenSsl(System::Security::Cryptography::ECCurve curve);
public ECDiffieHellmanOpenSsl (System.Security.Cryptography.ECCurve curve);
[System.Runtime.Versioning.UnsupportedOSPlatform("android")]
[System.Runtime.Versioning.UnsupportedOSPlatform("browser")]
[System.Runtime.Versioning.UnsupportedOSPlatform("ios")]
[System.Runtime.Versioning.UnsupportedOSPlatform("tvos")]
[System.Runtime.Versioning.UnsupportedOSPlatform("windows")]
public ECDiffieHellmanOpenSsl (System.Security.Cryptography.ECCurve curve);
new System.Security.Cryptography.ECDiffieHellmanOpenSsl : System.Security.Cryptography.ECCurve -> System.Security.Cryptography.ECDiffieHellmanOpenSsl
[<System.Runtime.Versioning.UnsupportedOSPlatform("android")>]
[<System.Runtime.Versioning.UnsupportedOSPlatform("browser")>]
[<System.Runtime.Versioning.UnsupportedOSPlatform("ios")>]
[<System.Runtime.Versioning.UnsupportedOSPlatform("tvos")>]
[<System.Runtime.Versioning.UnsupportedOSPlatform("windows")>]
new System.Security.Cryptography.ECDiffieHellmanOpenSsl : System.Security.Cryptography.ECCurve -> System.Security.Cryptography.ECDiffieHellmanOpenSsl
Public Sub New (curve As ECCurve)

參數

curve
ECCurve

用來產生暫時性公開/私密金鑰組的曲線。

屬性

例外狀況

curve 不會驗證。

另請參閱

適用於

ECDiffieHellmanOpenSsl(SafeEvpPKeyHandle)

來源:
ECDiffieHellmanOpenSsl.cs
來源:
ECDiffieHellmanOpenSsl.cs
來源:
ECDiffieHellmanOpenSsl.cs

從表示為 EVP_PKEY* 的現有 OpenSSL 索引鍵, ECDiffieHellmanOpenSsl 初始化 類別的新實例。

public:
 ECDiffieHellmanOpenSsl(System::Security::Cryptography::SafeEvpPKeyHandle ^ pkeyHandle);
public ECDiffieHellmanOpenSsl (System.Security.Cryptography.SafeEvpPKeyHandle pkeyHandle);
[System.Runtime.Versioning.UnsupportedOSPlatform("android")]
[System.Runtime.Versioning.UnsupportedOSPlatform("browser")]
[System.Runtime.Versioning.UnsupportedOSPlatform("ios")]
[System.Runtime.Versioning.UnsupportedOSPlatform("tvos")]
[System.Runtime.Versioning.UnsupportedOSPlatform("windows")]
public ECDiffieHellmanOpenSsl (System.Security.Cryptography.SafeEvpPKeyHandle pkeyHandle);
new System.Security.Cryptography.ECDiffieHellmanOpenSsl : System.Security.Cryptography.SafeEvpPKeyHandle -> System.Security.Cryptography.ECDiffieHellmanOpenSsl
[<System.Runtime.Versioning.UnsupportedOSPlatform("android")>]
[<System.Runtime.Versioning.UnsupportedOSPlatform("browser")>]
[<System.Runtime.Versioning.UnsupportedOSPlatform("ios")>]
[<System.Runtime.Versioning.UnsupportedOSPlatform("tvos")>]
[<System.Runtime.Versioning.UnsupportedOSPlatform("windows")>]
new System.Security.Cryptography.ECDiffieHellmanOpenSsl : System.Security.Cryptography.SafeEvpPKeyHandle -> System.Security.Cryptography.ECDiffieHellmanOpenSsl
Public Sub New (pkeyHandle As SafeEvpPKeyHandle)

參數

pkeyHandle
SafeEvpPKeyHandle

要當做索引鍵使用的 OpenSSL EVP_PKEY* 值,以 表示為 SafeEvpPKeyHandle

屬性

例外狀況

pkeyHandle 代表無效的控制代碼。

pkeyHandlenull

pkeyHandle 不代表橢圓曲線 (EC) 金鑰。

備註

重要

OpenSSL 支援在同一個進程中載入多個程式庫版本。 呼叫此建構函式之前,請確認指標值來自這個類別所使用的相同 OpenSSL 版本。 如需詳細資訊,請參閱OpenSslVersion

另請參閱

適用於