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)

property CngAlgorithm^ HashAlgorithm {
	CngAlgorithm^ get();
	void set(CngAlgorithm^ value);

Property Value

Type: System.Security.Cryptography::CngAlgorithm^

An object that specifies the hash algorithm.

Exception Condition

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
Available since 3.5
Return to top