DSACng Class
Provides a Cryptography Next Generation (CNG) implementation of the Digital Signature Algorithm (DSA).
Assembly: System.Core (in System.Core.dll)
System.Security.Cryptography.AsymmetricAlgorithm
System.Security.Cryptography.DSA
System.Security.Cryptography.DSACng
| Name | Description | |
|---|---|---|
![]() | DSACng() | Initializes a new instance of the DSACng class with a random 2,048-bit key pair. |
![]() | DSACng(CngKey) | Initializes a new instance of the DSACng class with the specified key. |
![]() | DSACng(Int32) | Initializes a new instance of the DSACng class with a randomly generated key of the specified size. |
| Name | Description | |
|---|---|---|
![]() | Key | Gets the key that will be used by the DSACng object for any cryptographic operation that it performs. |
![]() | KeyExchangeAlgorithm | Gets the name of the key exchange algorithm.(Overrides AsymmetricAlgorithm.KeyExchangeAlgorithm.) |
![]() | KeySize | Gets or sets the size, in bits, of the key modulus used by the asymmetric algorithm.(Inherited from AsymmetricAlgorithm.) |
![]() | LegalKeySizes | Gets the key sizes, in bits, that are supported by the DSA algorithm.(Overrides AsymmetricAlgorithm.LegalKeySizes.) |
![]() | SignatureAlgorithm | Gets the name of the signature algorithm. (Overrides AsymmetricAlgorithm.SignatureAlgorithm.) |
| Name | Description | |
|---|---|---|
![]() | Clear() | Releases all resources used by the AsymmetricAlgorithm class.(Inherited from AsymmetricAlgorithm.) |
![]() | CreateSignature(Byte()) | Creates the digital signature for the specified data.(Overrides DSA.CreateSignature(Byte()).) |
![]() | Dispose() | Releases all resources used by the current instance of the AsymmetricAlgorithm class.(Inherited from AsymmetricAlgorithm.) |
![]() | Equals(Object) | Determines whether the specified object is equal to the current object.(Inherited from Object.) |
![]() | ExportParameters(Boolean) | Exports the DSA algorithm parameters. (Overrides DSA.ExportParameters(Boolean).) |
![]() | FromXmlString(String) | |
![]() | GetHashCode() | Serves as the default hash function. (Inherited from Object.) |
![]() | GetType() | |
![]() | ImportParameters(DSAParameters) | Replaces the existing key that the current instance is working with by creating a new CngKey for the parameters structure. (Overrides DSA.ImportParameters(DSAParameters).) |
![]() | SignData(Byte(), HashAlgorithmName) | Computes the hash value of the specified byte array using the specified hash algorithm and signs the resulting hash value. (Inherited from DSA.) |
![]() | SignData(Byte(), Int32, Int32, HashAlgorithmName) | Computes the hash value of a portion of the specified byte array using the specified hash algorithm and signs the resulting hash value. (Inherited from DSA.) |
![]() | SignData(Stream, HashAlgorithmName) | Computes the hash value of the specified stream using the specified hash algorithm and signs the resulting hash value.(Inherited from DSA.) |
![]() | ToString() | Returns a string that represents the current object.(Inherited from Object.) |
![]() | ToXmlString(Boolean) | |
![]() | VerifyData(Byte(), Byte(), HashAlgorithmName) | Verifies that a digital signature is valid by calculating the hash value of the specified data using the specified hash algorithm and comparing it to the provided signature. (Inherited from DSA.) |
![]() | VerifyData(Byte(), Int32, Int32, Byte(), HashAlgorithmName) | Verifies that a digital signature is valid by calculating the hash value of the data in a portion of a byte array using the specified hash algorithm and comparing it to the provided signature. (Inherited from DSA.) |
![]() | VerifyData(Stream, Byte(), HashAlgorithmName) | Verifies that a digital signature is valid by calculating the hash value of the specified stream using the specified hash algorithm and comparing it to the provided signature. (Inherited from DSA.) |
![]() | VerifySignature(Byte(), Byte()) | Verifies if the specified digital signature matches the specified data. (Overrides DSA.VerifySignature(Byte(), Byte()).) |
Available since 4.6.2
Any public static ( Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

