Hash.GenerateHash Method (HashAlgorithm)


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


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.

Exception Condition

The hashAlg parameter is null.


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