This documentation is archived and is not being maintained.

ECDiffieHellmanCng.HashAlgorithm Property

Gets or sets the hash algorithm to use when generating key material.

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

'Declaration
Public Property HashAlgorithm As CngAlgorithm
'Usage
Dim instance As ECDiffieHellmanCng 
Dim value As CngAlgorithm 

value = instance.HashAlgorithm

instance.HashAlgorithm = value

Property Value

Type: System.Security.Cryptography.CngAlgorithm
An object that specifies the hash algorithm.

ExceptionCondition
ArgumentNullException

The value is null.

This property is used by Cryptography Next Generation (CNG) objects only if the Hash or Hmac value is set in the KeyDerivationFunction property.

This property accepts the following algorithms: MD5, Sha1, Sha256, Sha384, and Sha512.

Other custom hash algorithms may also be used.

The default algorithm is Sha256.

Windows 7, Windows Vista, Windows Server 2008 R2, Windows Server 2008

The .NET Framework and .NET Compact Framework do not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

.NET Framework

Supported in: 3.5
Show: