DSACng Class

 
System_CAPS_noteNote

The .NET API Reference documentation has a new home. Visit the .NET API Browser on docs.microsoft.com to see the new experience.

Provides a Cryptography Next Generation (CNG) implementation of the Digital Signature Algorithm (DSA).

Namespace:   System.Security.Cryptography
Assembly:  System.Core (in System.Core.dll)


public sealed class DSACng : DSA

NameDescription
System_CAPS_pubmethodDSACng()

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

System_CAPS_pubmethodDSACng(CngKey)

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

System_CAPS_pubmethodDSACng(Int32)

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

NameDescription
System_CAPS_pubpropertyKey

Gets the key that will be used by the DSACng object for any cryptographic operation that it performs.

System_CAPS_pubpropertyKeyExchangeAlgorithm

Gets the name of the key exchange algorithm.(Overrides AsymmetricAlgorithm.KeyExchangeAlgorithm.)

System_CAPS_pubpropertyKeySize

Gets or sets the size, in bits, of the key modulus used by the asymmetric algorithm.(Inherited from AsymmetricAlgorithm.)

System_CAPS_pubpropertyLegalKeySizes

Gets the key sizes, in bits, that are supported by the DSA algorithm.(Overrides AsymmetricAlgorithm.LegalKeySizes.)

System_CAPS_pubpropertySignatureAlgorithm

Gets the name of the signature algorithm. (Overrides AsymmetricAlgorithm.SignatureAlgorithm.)

NameDescription
System_CAPS_pubmethodClear()

Releases all resources used by the AsymmetricAlgorithm class.(Inherited from AsymmetricAlgorithm.)

System_CAPS_pubmethodCreateSignature(Byte[])

Creates the digital signature for the specified data.(Overrides DSA.CreateSignature(Byte[]).)

System_CAPS_pubmethodDispose()

Releases all resources used by the current instance of the AsymmetricAlgorithm class.(Inherited from AsymmetricAlgorithm.)

System_CAPS_pubmethodEquals(Object)

Determines whether the specified object is equal to the current object.(Inherited from Object.)

System_CAPS_pubmethodExportParameters(Boolean)

Exports the DSA algorithm parameters. (Overrides DSA.ExportParameters(Boolean).)

System_CAPS_pubmethodFromXmlString(String)

Reconstructs a DSA object from an XML string.(Inherited from DSA.)

System_CAPS_pubmethodGetHashCode()

Serves as the default hash function. (Inherited from Object.)

System_CAPS_pubmethodGetType()

Gets the Type of the current instance.(Inherited from Object.)

System_CAPS_pubmethodImportParameters(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).)

System_CAPS_pubmethodSignData(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.)

System_CAPS_pubmethodSignData(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.)

System_CAPS_pubmethodSignData(Stream, HashAlgorithmName)

Computes the hash value of the specified stream using the specified hash algorithm and signs the resulting hash value.(Inherited from DSA.)

System_CAPS_pubmethodToString()

Returns a string that represents the current object.(Inherited from Object.)

System_CAPS_pubmethodToXmlString(Boolean)

Creates and returns an XML string representation of the current DSA object.(Inherited from DSA.)

System_CAPS_pubmethodVerifyData(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.)

System_CAPS_pubmethodVerifyData(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.)

System_CAPS_pubmethodVerifyData(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.)

System_CAPS_pubmethodVerifySignature(Byte[], Byte[])

Verifies if the specified digital signature matches the specified data. (Overrides DSA.VerifySignature(Byte[], Byte[]).)

.NET Framework
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.

Return to top
Show: