語言

ECDsaCng 建構函式

定義

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

多載

名稱 Description
ECDsaCng()

初始化一個隨機金鑰對的新類別實例 ECDsaCng 。

ECDsaCng(Int32)

初始化一個以指定目標金鑰大小的新類別實例 ECDsaCng 。

ECDsaCng(CngKey)

使用指定的 ECDsaCng 物件,初始化 CngKey 類別的新實例。

ECDsaCng(ECCurve)

初始化一個新實例 ECDsaCng ,該類別的公私鑰對是在指定曲線上產生的。

ECDsaCng()

來源:
Cng.NotSupported.cs
來源:
Cng.NotSupported.cs
來源:
Cng.NotSupported.cs
來源:
Cng.NotSupported.cs
來源:
Cng.NotSupported.cs

初始化一個隨機金鑰對的新類別實例 ECDsaCng 。

public:
 ECDsaCng();
[System.Runtime.Versioning.SupportedOSPlatform("windows")]
public ECDsaCng();
public ECDsaCng();
Public Sub New ()
屬性

例外狀況

此系統不支援密碼學下一代(CNG)類別。

備註

此構造子不會立即產生新的公私鑰對。 此建構器將屬性設 KeySize 為 521,當需要鍵時,儲存的大小用來識別目標曲線。 如果是透過該 ImportParameters 方法或其他金鑰匯入方法載入金鑰,這個建構子的金鑰大小就沒有意義。

另請參閱

適用於

ECDsaCng(Int32)

來源:
Cng.NotSupported.cs
來源:
Cng.NotSupported.cs
來源:
Cng.NotSupported.cs
來源:
Cng.NotSupported.cs
來源:
Cng.NotSupported.cs

初始化一個以指定目標金鑰大小的新類別實例 ECDsaCng 。

public:
 ECDsaCng(int keySize);
[System.Runtime.Versioning.SupportedOSPlatform("windows")]
public ECDsaCng(int keySize);
public ECDsaCng(int keySize);
[System.Security.SecurityCritical]
public ECDsaCng(int keySize);
[<System.Runtime.Versioning.SupportedOSPlatform("windows")>]
new System.Security.Cryptography.ECDsaCng : int -> System.Security.Cryptography.ECDsaCng
new System.Security.Cryptography.ECDsaCng : int -> System.Security.Cryptography.ECDsaCng
[<System.Security.SecurityCritical>]
new System.Security.Cryptography.ECDsaCng : int -> System.Security.Cryptography.ECDsaCng
Public Sub New (keySize As Integer)

參數

keySize
Int32

鑰匙的大小。 有效的金鑰大小為 256、384 和 521 位元。

屬性

例外狀況

此系統不支援密碼學下一代(CNG)類別。

keySize 指定一個無效的長度。

備註

此構造子不會立即產生新的公私鑰對。 此建構子將屬性設定 KeySize 為所提供值,當需要鍵時,會利用儲存的大小來識別目標曲線。 如果是透過該 ImportParameters 方法或其他金鑰匯入方法載入金鑰,這個建構子的金鑰大小就沒有意義。

另請參閱

適用於

ECDsaCng(CngKey)

來源:
Cng.NotSupported.cs
來源:
Cng.NotSupported.cs
來源:
Cng.NotSupported.cs
來源:
Cng.NotSupported.cs
來源:
Cng.NotSupported.cs

使用指定的 ECDsaCng 物件,初始化 CngKey 類別的新實例。

public:
 ECDsaCng(System::Security::Cryptography::CngKey ^ key);
[System.Runtime.Versioning.SupportedOSPlatform("windows")]
public ECDsaCng(System.Security.Cryptography.CngKey key);
public ECDsaCng(System.Security.Cryptography.CngKey key);
[System.Security.SecurityCritical]
public ECDsaCng(System.Security.Cryptography.CngKey key);
[<System.Runtime.Versioning.SupportedOSPlatform("windows")>]
new System.Security.Cryptography.ECDsaCng : System.Security.Cryptography.CngKey -> System.Security.Cryptography.ECDsaCng
new System.Security.Cryptography.ECDsaCng : System.Security.Cryptography.CngKey -> System.Security.Cryptography.ECDsaCng
[<System.Security.SecurityCritical>]
new System.Security.Cryptography.ECDsaCng : System.Security.Cryptography.CngKey -> System.Security.Cryptography.ECDsaCng
Public Sub New (key As CngKey)

參數

key
CngKey

將用作當前物件執行密碼運算輸入的金鑰。

屬性

例外狀況

key 並未指定橢圓曲線數位簽章演算法(ECDSA)群組。

key 是 null。

此系統不支援密碼學下一代(CNG)類別。

適用於

ECDsaCng(ECCurve)

來源:
Cng.NotSupported.cs
來源:
Cng.NotSupported.cs
來源:
Cng.NotSupported.cs
來源:
Cng.NotSupported.cs
來源:
Cng.NotSupported.cs

初始化一個新實例 ECDsaCng ,該類別的公私鑰對是在指定曲線上產生的。

public:
 ECDsaCng(System::Security::Cryptography::ECCurve curve);
[System.Runtime.Versioning.SupportedOSPlatform("windows")]
public ECDsaCng(System.Security.Cryptography.ECCurve curve);
public ECDsaCng(System.Security.Cryptography.ECCurve curve);
[<System.Runtime.Versioning.SupportedOSPlatform("windows")>]
new System.Security.Cryptography.ECDsaCng : System.Security.Cryptography.ECCurve -> System.Security.Cryptography.ECDsaCng
new System.Security.Cryptography.ECDsaCng : System.Security.Cryptography.ECCurve -> System.Security.Cryptography.ECDsaCng
Public Sub New (curve As ECCurve)

參數

curve
ECCurve

用於產生公私鑰對的曲線。

屬性

例外狀況

curve 不驗證。

curve 是 null。

如果 curve 不包含帶有 FriendlyName 的 Oid。

備註

curve 必須驗證(即必須回傳 true), ECCurve.Validate 且必須是命名或明確的質數。

適用於