Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
HashAlgorithm Property

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)

member HashAlgorithm : CngAlgorithm with get, set

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.

.NET Framework

Supported in: 4.6, 4.5, 4, 3.5

.NET Framework Client Profile

Supported in: 4, 3.5 SP1
Show:
© 2015 Microsoft