Export (0) Print
Expand All

Hash.GenerateHash Method

Computes the hash value for the assembly using the specified hash algorithm.

Namespace:  System.Security.Policy
Assembly:  mscorlib (in mscorlib.dll)

public byte[] GenerateHash(
	HashAlgorithm hashAlg
)

Parameters

hashAlg
Type: System.Security.Cryptography.HashAlgorithm

The hash algorithm to use to compute the hash value for the assembly.

Return Value

Type: System.Byte[]
A byte array that represents the hash value for the assembly.

ExceptionCondition
ArgumentNullException

The hashAlg parameter is null.

SecurityException

The hash value for the assembly cannot be generated.

The assembly specified in the class constructor provides the bytes for computing the hash value. The hashAlg parameter is an object derived from a specific HashAlgorithm. The returned hash value is of the type identified by hashAlg.

.NET Framework

Supported in: 4.5, 4, 3.5, 3.0, 2.0, 1.1, 1.0

.NET Framework Client Profile

Supported in: 4, 3.5 SP1

Windows 8.1, Windows Server 2012 R2, Windows 8, Windows Server 2012, Windows 7, Windows Vista SP2, Windows Server 2008 (Server Core Role not supported), Windows Server 2008 R2 (Server Core Role supported with SP1 or later; Itanium not supported)

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

Show:
© 2014 Microsoft