# Hash class

Namespace: [Grasshopper2.Types.Hashing](https://developer.rhino3d.com/api/gh2/namespace/grasshopper2.types.hashing.md) · Assembly: [Grasshopper2](https://developer.rhino3d.com/api/gh2/assembly/grasshopper2.md)

```cs
public class Hash : IComparable<Hash>, IEquatable<Hash>, IStorable
```

Represents a single, immutable 256-bit hash value.

## Constructors

- [Hash](https://developer.rhino3d.com/api/gh2/type/grasshopper2.types.hashing.hash/ctor.md): Read this hash from an archive.

## Fields

- [BitDepth](https://developer.rhino3d.com/api/gh2/type/grasshopper2.types.hashing.hash/bitdepth.md): (static) Gets the number of bits in the hash.
- [ByteDepth](https://developer.rhino3d.com/api/gh2/type/grasshopper2.types.hashing.hash/bytedepth.md): (static) Gets the number of bytes in the hash.
- [Empty](https://developer.rhino3d.com/api/gh2/type/grasshopper2.types.hashing.hash/empty.md): (static) Gets the empty hash.

## Properties

- [IsEmpty](https://developer.rhino3d.com/api/gh2/type/grasshopper2.types.hashing.hash/isempty.md): Gets whether this hash is empty.

## Methods

- [CreateFromBytes](https://developer.rhino3d.com/api/gh2/type/grasshopper2.types.hashing.hash/createfrombytes.md): (static) Create a hash from a byte array.
- [CreateFromCollection](https://developer.rhino3d.com/api/gh2/type/grasshopper2.types.hashing.hash/createfromcollection.md): (5 overloads, static) Create a hash from a byte array.
- [CreateFromDelegate<T>](https://developer.rhino3d.com/api/gh2/type/grasshopper2.types.hashing.hash/createfromdelegate.md): (static) Create a hash from a collection and a hasher function.
- [CreateFromFile](https://developer.rhino3d.com/api/gh2/type/grasshopper2.types.hashing.hash/createfromfile.md): (static) Create a hash from the contents of a path.
- [CreateFromObjects](https://developer.rhino3d.com/api/gh2/type/grasshopper2.types.hashing.hash/createfromobjects.md): (static) Use the GetHashCode() method on each object for a composite hash.
- [CreateFromStream](https://developer.rhino3d.com/api/gh2/type/grasshopper2.types.hashing.hash/createfromstream.md): (static) Create a hash from the contents of a stream.
- [CreateFromString](https://developer.rhino3d.com/api/gh2/type/grasshopper2.types.hashing.hash/createfromstring.md): (static) Create a hash from a string.
- [Equals](https://developer.rhino3d.com/api/gh2/type/grasshopper2.types.hashing.hash/equals.md): Test equality between this hash and another object.
- [GetHashCode](https://developer.rhino3d.com/api/gh2/type/grasshopper2.types.hashing.hash/gethashcode.md): Standard 32-bit hash code implementation.
- [Store](https://developer.rhino3d.com/api/gh2/type/grasshopper2.types.hashing.hash/store.md): Write this hash to an archive. This is not typically advised as hashing algorithms may change at any moment. Hashes should be recomputed anew during each appdomain session.
- [IComparable<Hash>.CompareTo](https://developer.rhino3d.com/api/gh2/type/grasshopper2.types.hashing.hash/system-icomparable-grasshopper2-types-hashing-hash-compareto.md)
- [IEquatable<Hash>.Equals](https://developer.rhino3d.com/api/gh2/type/grasshopper2.types.hashing.hash/system-iequatable-grasshopper2-types-hashing-hash-equals.md)
- [ToBitArray](https://developer.rhino3d.com/api/gh2/type/grasshopper2.types.hashing.hash/tobitarray.md): Create a bit array from this hash.
- [ToByteArray](https://developer.rhino3d.com/api/gh2/type/grasshopper2.types.hashing.hash/tobytearray.md): (5 overloads) Create a byte array from this hash.
- [ToGuid](https://developer.rhino3d.com/api/gh2/type/grasshopper2.types.hashing.hash/toguid.md): Create a Guid from this hash.
- [ToString](https://developer.rhino3d.com/api/gh2/type/grasshopper2.types.hashing.hash/tostring.md): (2 overloads) Convert this hash to a string.

## Operators

- [operator &](https://developer.rhino3d.com/api/gh2/type/grasshopper2.types.hashing.hash/op-bitwiseand.md): (static) Apply logical conjunction on two hashes.
- [operator |](https://developer.rhino3d.com/api/gh2/type/grasshopper2.types.hashing.hash/op-bitwiseor.md): (static) Apply logical disjunction on two hashes.
- [operator ==](https://developer.rhino3d.com/api/gh2/type/grasshopper2.types.hashing.hash/op-equality.md): (static) Test two hashes for equality.
- [operator ^](https://developer.rhino3d.com/api/gh2/type/grasshopper2.types.hashing.hash/op-exclusiveor.md): (static) Apply a bitwise exclusive or to two hashes.
- [operator !=](https://developer.rhino3d.com/api/gh2/type/grasshopper2.types.hashing.hash/op-inequality.md): (static) Test two hashes for inequality.
- [operator ~](https://developer.rhino3d.com/api/gh2/type/grasshopper2.types.hashing.hash/op-onescomplement.md): (static) Apply a bitwise complement on a hash.
