Share via


ECDsaCng 建構函式

定義

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

多載

ECDsaCng()

使用隨機金鑰組,初始化 ECDsaCng 類別的新執行個體。

ECDsaCng(Int32)

使用指定的目標金鑰大小,初始化 ECDsaCng 類別的新執行個體。

ECDsaCng(CngKey)

使用指定的 CngKey 物件,初始化 ECDsaCng 類別的新執行個體。

ECDsaCng(ECCurve)

初始化 ECDsaCng 類別的新執行個體,其公開/私密金鑰組是在指定的曲線上所產生。

ECDsaCng()

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

使用隨機金鑰組,初始化 ECDsaCng 類別的新執行個體。

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

例外狀況

這個系統不支援新一代密碼編譯 (CNG) 類別。

備註

此建構函式不會立即產生新的公開/私鑰組。 此建構函式會將 KeySize 屬性設定為521,而且當需要索引鍵時,會使用儲存的大小來識別目標曲線。 如果密鑰是透過 ImportParameters 方法或其他金鑰匯入方法載入,則此建構函式中的金鑰大小沒有任何意義。

另請參閱

適用於

ECDsaCng(Int32)

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

使用指定的目標金鑰大小,初始化 ECDsaCng 類別的新執行個體。

public:
 ECDsaCng(int keySize);
public ECDsaCng (int keySize);
[System.Runtime.Versioning.SupportedOSPlatform("windows")]
public ECDsaCng (int keySize);
[System.Security.SecurityCritical]
public ECDsaCng (int keySize);
new System.Security.Cryptography.ECDsaCng : int -> System.Security.Cryptography.ECDsaCng
[<System.Runtime.Versioning.SupportedOSPlatform("windows")>]
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

使用指定的 CngKey 物件,初始化 ECDsaCng 類別的新執行個體。

public:
 ECDsaCng(System::Security::Cryptography::CngKey ^ key);
public ECDsaCng (System.Security.Cryptography.CngKey key);
[System.Runtime.Versioning.SupportedOSPlatform("windows")]
public ECDsaCng (System.Security.Cryptography.CngKey key);
[System.Security.SecurityCritical]
public ECDsaCng (System.Security.Cryptography.CngKey key);
new System.Security.Cryptography.ECDsaCng : System.Security.Cryptography.CngKey -> System.Security.Cryptography.ECDsaCng
[<System.Runtime.Versioning.SupportedOSPlatform("windows")>]
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) 群組。

keynull

這個系統不支援新一代密碼編譯 (CNG) 類別。

適用於

ECDsaCng(ECCurve)

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

初始化 ECDsaCng 類別的新執行個體,其公開/私密金鑰組是在指定的曲線上所產生。

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

參數

curve
ECCurve

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

屬性

例外狀況

curve 不會驗證。

curvenull

如果 curve 不包含具有 FriendlyName 的 OID。

備註

curve必須驗證 (也就是說,它必須在傳遞至 ECCurve.Validate 方法時傳回 true) ,而且必須是具名或明確的質數。

適用於