語言

ECDiffieHellmanOpenSsl 建構函式

定義

初始化 ECDiffieHellmanOpenSsl 類別的新執行個體。

多載

名稱 Description
ECDiffieHellmanOpenSsl()

初始化該類別的新實例 ECDiffieHellmanOpenSsl ,預設曲線為 NIST P-521/secp521r1。

ECDiffieHellmanOpenSsl(Int32)

初始化類別的新實例 ECDiffieHellmanOpenSsl ,預設為指定大小的 NIST 質曲線。

ECDiffieHellmanOpenSsl(IntPtr)

從現有的 OpenSSL 金鑰(以 ECDiffieHellmanOpenSsl. 表示)初始化該EC_KEY*類別的新實例。

ECDiffieHellmanOpenSsl(ECCurve)

初始化該類別的新實例 ECDiffieHellmanOpenSsl ,並在指定曲線上產生新的鍵值。

ECDiffieHellmanOpenSsl(SafeEvpPKeyHandle)

從現有的 OpenSSL 金鑰(以 ECDiffieHellmanOpenSsl. 表示)初始化該EVP_PKEY*類別的新實例。

ECDiffieHellmanOpenSsl()

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

初始化該類別的新實例 ECDiffieHellmanOpenSsl ,預設曲線為 NIST P-521/secp521r1。

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 ECDiffieHellmanOpenSsl();
Public Sub New ()
屬性

備註

此建構器不會立即產生新的公私密金鑰對,僅設定在需要時用來產生金鑰的大小。 如果金鑰是透過該 ImportParameters 方法或其他金鑰匯入方式載入,這個建構子的金鑰大小就沒有意義。

另請參閱

適用於

ECDiffieHellmanOpenSsl(Int32)

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

初始化類別的新實例 ECDiffieHellmanOpenSsl ,預設為指定大小的 NIST 質曲線。

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);
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")>]
new System.Security.Cryptography.ECDiffieHellmanOpenSsl : int -> System.Security.Cryptography.ECDiffieHellmanOpenSsl
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
來源:
ECDiffieHellmanOpenSsl.cs
來源:
ECDiffieHellmanOpenSsl.cs

從現有的 OpenSSL 金鑰(以 ECDiffieHellmanOpenSsl. 表示)初始化該EC_KEY*類別的新實例。

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);
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")>]
new System.Security.Cryptography.ECDiffieHellmanOpenSsl : nativeint -> System.Security.Cryptography.ECDiffieHellmanOpenSsl
new System.Security.Cryptography.ECDiffieHellmanOpenSsl : nativeint -> System.Security.Cryptography.ECDiffieHellmanOpenSsl
Public Sub New (handle As IntPtr)

參數

handle
IntPtr

nativeint

用 OpenSSL EC_KEY* 值作為金鑰。

屬性

例外狀況

handle 是 Zero。

handle 不是有效的 EC_KEY*。

備註

Important

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

另請參閱

適用於

ECDiffieHellmanOpenSsl(ECCurve)

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

初始化該類別的新實例 ECDiffieHellmanOpenSsl ,並在指定曲線上產生新的鍵值。

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);
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")>]
new System.Security.Cryptography.ECDiffieHellmanOpenSsl : System.Security.Cryptography.ECCurve -> System.Security.Cryptography.ECDiffieHellmanOpenSsl
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
來源:
ECDiffieHellmanOpenSsl.cs
來源:
ECDiffieHellmanOpenSsl.cs

從現有的 OpenSSL 金鑰(以 ECDiffieHellmanOpenSsl. 表示)初始化該EVP_PKEY*類別的新實例。

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);
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")>]
new System.Security.Cryptography.ECDiffieHellmanOpenSsl : System.Security.Cryptography.SafeEvpPKeyHandle -> System.Security.Cryptography.ECDiffieHellmanOpenSsl
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 代表無效的句柄。

pkeyHandle 是 null。

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

備註

Important

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

另請參閱

適用於