DSACng DSACng DSACng DSACng Constructors

Definition

Overloads

DSACng() DSACng() DSACng()

Initializes a new instance of the DSACng class with a random 2,048-bit key pair.

DSACng(Int32) DSACng(Int32) DSACng(Int32) DSACng(Int32)

Initializes a new instance of the DSACng class with a randomly generated key of the specified size.

DSACng(CngKey) DSACng(CngKey) DSACng(CngKey) DSACng(CngKey)

Initializes a new instance of the DSACng class with the specified key.

DSACng() DSACng() DSACng()

Initializes a new instance of the DSACng class with a random 2,048-bit key pair.

public:
 DSACng();
public DSACng ();
Public Sub New ()

DSACng(Int32) DSACng(Int32) DSACng(Int32) DSACng(Int32)

Initializes a new instance of the DSACng class with a randomly generated key of the specified size.

public:
 DSACng(int keySize);
public DSACng (int keySize);
new System.Security.Cryptography.DSACng : int -> System.Security.Cryptography.DSACng
Public Sub New (keySize As Integer)

Parameters

keySize
Int32 Int32 Int32 Int32

The size of the key to generate in bits.

Exceptions

Remarks

Valid key sizes range from 512 to 3,072 bits, in increments of 64. We recommend that a minimum size of 2,048 bits be used for all keys.

DSACng(CngKey) DSACng(CngKey) DSACng(CngKey) DSACng(CngKey)

Initializes a new instance of the DSACng class with the specified key.

public:
 DSACng(System::Security::Cryptography::CngKey ^ key);
public DSACng (System.Security.Cryptography.CngKey key);
new System.Security.Cryptography.DSACng : System.Security.Cryptography.CngKey -> System.Security.Cryptography.DSACng
Public Sub New (key As CngKey)

Parameters

key
CngKey CngKey CngKey CngKey

The key to use for DSA operations.

Exceptions

Remarks

The CngKey.AlgorithmGroup of key must be CngAlgorithmGroup.Dsa.

This constructor creates a copy of the key. Even if key is disposed, the copy of this key object in DSA remains alive.

Applies to