Hash Class
Provides evidence about the hash value for an assembly. This class cannot be inherited.
Assembly: mscorlib (in mscorlib.dll)
The Hash type exposes the following members.
| Name | Description | |
|---|---|---|
![]() | Clone | Creates a new object that is a copy of the current instance. (Overrides EvidenceBase::Clone().) |
![]() ![]() | CreateMD5 | Creates a Hash object that contains an MD5 hash value. |
![]() ![]() | CreateSHA1 | Creates a Hash object that contains a SHA1 hash value. |
![]() ![]() | CreateSHA256 | Creates a Hash object that contains a SHA256 hash value. |
![]() | Equals(Object) | Determines whether the specified Object is equal to the current Object. (Inherited from Object.) |
![]() | Finalize | Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object.) |
![]() | GenerateHash | Computes the hash value for the assembly using the specified hash algorithm. |
![]() | GetHashCode | Serves as a hash function for a particular type. (Inherited from Object.) |
![]() | GetObjectData | Gets the SerializationInfo object with the parameter name and additional exception information. |
![]() | GetType | Gets the Type of the current instance. (Inherited from Object.) |
![]() | MemberwiseClone | Creates a shallow copy of the current Object. (Inherited from Object.) |
![]() | ToString | Returns a string representation of the current Hash. (Overrides Object::ToString().) |
A hash value represents a unique value that corresponds to a particular set of bytes. Rather than referring to an assembly by name, version, or other designation, a hash value designates the assembly without ambiguity. Names are subject to collisions in rare cases where the same name is given to completely different code. Different variations of code can accidentally be marked with the same version. However, even changing a single bit results in a very different hash value.
Hash values are a cryptographically secure way to refer to specific assemblies in policy without the use of digital signatures. A secure hash algorithm is designed so that it is computationally infeasible to construct a different assembly with the identical hash value by either an accidental or malicious attempt. By default, evidence from the SHA1 and MD5 hash algorithms is supported, although any hash algorithm can be used through GenerateHash.
Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows XP SP2 x64 Edition, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2
The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.
