ECDiffieHellmanCng 建構函式
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
初始化 ECDiffieHellmanCng 類別的新執行個體。
多載
| 名稱 | Description |
|---|---|
| ECDiffieHellmanCng() |
初始化一個隨機金鑰對的新類別實例 ECDiffieHellmanCng 。 |
| ECDiffieHellmanCng(Int32) |
使用指定的金鑰大小,初始化一個隨機金鑰對的新類別實例 ECDiffieHellmanCng 。 |
| ECDiffieHellmanCng(CngKey) |
使用指定的 ECDiffieHellmanCng 物件,初始化 CngKey 類別的新實例。 |
| ECDiffieHellmanCng(ECCurve) |
建立一個新的類別實例 ECDiffieHellmanCng ,其公私鑰對是在指定的曲線上產生的。 |
ECDiffieHellmanCng()
初始化一個隨機金鑰對的新類別實例 ECDiffieHellmanCng 。
public:
ECDiffieHellmanCng();
[System.Runtime.Versioning.SupportedOSPlatform("windows")]
public ECDiffieHellmanCng();
public ECDiffieHellmanCng();
Public Sub New ()
- 屬性
備註
隨機金鑰對的預設公鑰長度為 521 位元。
適用於
ECDiffieHellmanCng(Int32)
使用指定的金鑰大小,初始化一個隨機金鑰對的新類別實例 ECDiffieHellmanCng 。
public:
ECDiffieHellmanCng(int keySize);
[System.Runtime.Versioning.SupportedOSPlatform("windows")]
public ECDiffieHellmanCng(int keySize);
public ECDiffieHellmanCng(int keySize);
[System.Security.SecurityCritical]
public ECDiffieHellmanCng(int keySize);
[<System.Runtime.Versioning.SupportedOSPlatform("windows")>]
new System.Security.Cryptography.ECDiffieHellmanCng : int -> System.Security.Cryptography.ECDiffieHellmanCng
new System.Security.Cryptography.ECDiffieHellmanCng : int -> System.Security.Cryptography.ECDiffieHellmanCng
[<System.Security.SecurityCritical>]
new System.Security.Cryptography.ECDiffieHellmanCng : int -> System.Security.Cryptography.ECDiffieHellmanCng
Public Sub New (keySize As Integer)
參數
- keySize
- Int32
鑰匙的大小。 有效的金鑰大小為 256、384 和 521 位元。
- 屬性
例外狀況
keySize 指定一個無效的長度。
此系統不支援密碼學下一代(CNG)類別。
備註
隨機金鑰對的公鑰長度由參數定義 keySize 。
適用於
ECDiffieHellmanCng(CngKey)
使用指定的 ECDiffieHellmanCng 物件,初始化 CngKey 類別的新實例。
public:
ECDiffieHellmanCng(System::Security::Cryptography::CngKey ^ key);
[System.Runtime.Versioning.SupportedOSPlatform("windows")]
public ECDiffieHellmanCng(System.Security.Cryptography.CngKey key);
public ECDiffieHellmanCng(System.Security.Cryptography.CngKey key);
[System.Security.SecurityCritical]
public ECDiffieHellmanCng(System.Security.Cryptography.CngKey key);
[<System.Runtime.Versioning.SupportedOSPlatform("windows")>]
new System.Security.Cryptography.ECDiffieHellmanCng : System.Security.Cryptography.CngKey -> System.Security.Cryptography.ECDiffieHellmanCng
new System.Security.Cryptography.ECDiffieHellmanCng : System.Security.Cryptography.CngKey -> System.Security.Cryptography.ECDiffieHellmanCng
[<System.Security.SecurityCritical>]
new System.Security.Cryptography.ECDiffieHellmanCng : System.Security.Cryptography.CngKey -> System.Security.Cryptography.ECDiffieHellmanCng
Public Sub New (key As CngKey)
參數
- key
- CngKey
將用作當前物件執行密碼運算輸入的金鑰。
- 屬性
例外狀況
key 是 null。
key 未指定橢圓曲線 Diffie-Hellman(ECDH)演算法群組。
此系統不支援密碼學下一代(CNG)類別。
適用於
ECDiffieHellmanCng(ECCurve)
建立一個新的類別實例 ECDiffieHellmanCng ,其公私鑰對是在指定的曲線上產生的。
public:
ECDiffieHellmanCng(System::Security::Cryptography::ECCurve curve);
[System.Runtime.Versioning.SupportedOSPlatform("windows")]
public ECDiffieHellmanCng(System.Security.Cryptography.ECCurve curve);
public ECDiffieHellmanCng(System.Security.Cryptography.ECCurve curve);
[<System.Runtime.Versioning.SupportedOSPlatform("windows")>]
new System.Security.Cryptography.ECDiffieHellmanCng : System.Security.Cryptography.ECCurve -> System.Security.Cryptography.ECDiffieHellmanCng
new System.Security.Cryptography.ECDiffieHellmanCng : System.Security.Cryptography.ECCurve -> System.Security.Cryptography.ECDiffieHellmanCng
Public Sub New (curve As ECCurve)
參數
- curve
- ECCurve
用於產生公私鑰對的曲線。
- 屬性
例外狀況
curve 不驗證。
備註
curve 必須驗證(即必須回傳 true), ECCurve.Validate 且必須是命名或明確的質數。