DSACng Konstruktory

Definice

Inicializuje novou instanci DSACng třídy.

Přetížení

DSACng()

Inicializuje novou instanci DSACng třídy náhodným 2048bitovým párem klíčů.

DSACng(Int32)

Inicializuje novou instanci DSACng třídy s náhodně vygenerovaným klíčem o zadané velikosti.

DSACng(CngKey)

Inicializuje novou instanci DSACng třídy pomocí zadaného klíče.

DSACng()

Zdroj:
Cng.NotSupported.cs
Zdroj:
Cng.NotSupported.cs
Zdroj:
Cng.NotSupported.cs

Inicializuje novou instanci DSACng třídy náhodným 2048bitovým párem klíčů.

public:
 DSACng();
public DSACng ();
[System.Runtime.Versioning.SupportedOSPlatform("windows")]
public DSACng ();
Public Sub New ()
Atributy

Platí pro

DSACng(Int32)

Zdroj:
Cng.NotSupported.cs
Zdroj:
Cng.NotSupported.cs
Zdroj:
Cng.NotSupported.cs

Inicializuje novou instanci DSACng třídy s náhodně vygenerovaným klíčem o zadané velikosti.

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

Parametry

keySize
Int32

Velikost klíče, který se má vygenerovat v bitech.

Atributy

Výjimky

keySize není platný.

Poznámky

Platné velikosti klíčů jsou v rozsahu od 512 do 3 072 bitů v přírůstcích po 64. Pro všechny klíče doporučujeme použít minimální velikost 2 048 bitů.

Důležité

Tvůrci algoritmu DSA pro něj stáhli podporu. Zvažte použití RSA třídy nebo ECDsa třídy místo DSA třídy. Používejte DSA pouze pro kompatibilitu se staršími aplikacemi a daty.

Platí pro

DSACng(CngKey)

Zdroj:
Cng.NotSupported.cs
Zdroj:
Cng.NotSupported.cs
Zdroj:
Cng.NotSupported.cs

Inicializuje novou instanci DSACng třídy pomocí zadaného klíče.

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

Parametry

key
CngKey

Klíč, který se má použít pro operace DSA.

Atributy

Výjimky

key není platný klíč DSA.

key je null.

Poznámky

Hodnota CngKey.AlgorithmGroup of key musí být CngAlgorithmGroup.Dsa.

Tento konstruktor vytvoří kopii klíče. I když key je odstraněna, kopie tohoto objektu klíče v DSA zůstane naživu.

Platí pro