# Hash64

> Compute a 64bits hash of a memory region

## Definition

* **Type:** Method
* **Namespace:** [Unity.Collections](/engine/6000.7/script-reference/unity/collections.md)
* **Assembly:** UnityEngine.ManagedKernelModule

## Hash64(void\*, long)

Compute a 64bits hash of a memory region

```csharp
public static uint2 Hash64(void* input, long length)
```

### Parameters

**** (\[void\*]\(https\://learn.microsoft.com/dotnet/api/system.void)): The memory buffer, can't be null**** (\[long]\(https\://learn.microsoft.com/dotnet/api/system.int64)): The length of the memory buffer, can be zero

### Returns

| Type                                                                | Description     |
| ------------------------------------------------------------------- | --------------- |
| [uint2](/engine/6000.7/script-reference/unity/mathematics/uint2.md) | The hash result |

## Hash64\<T>(T)

Compute a 64bits hash from the contents of the input struct

```csharp
public static uint2 Hash64<T>(in T input) where T : unmanaged
```

### Parameters

**** (T): The input struct that will be hashed

### Returns

| Type                                                                | Description     |
| ------------------------------------------------------------------- | --------------- |
| [uint2](/engine/6000.7/script-reference/unity/mathematics/uint2.md) | The hash result |

## Hash64(void\*, long, ulong)

Compute a 64bits hash of a memory region using a given seed value

```csharp
public static uint2 Hash64(void* input, long length, ulong seed)
```

### Parameters

**** (\[void\*]\(https\://learn.microsoft.com/dotnet/api/system.void)): The memory buffer, can't be null**** (\[long]\(https\://learn.microsoft.com/dotnet/api/system.int64)): The length of the memory buffer, can be zero**** (\[ulong]\(https\://learn.microsoft.com/dotnet/api/system.uint64)): The seed value to alter the hash computation from

### Returns

| Type                                                                | Description     |
| ------------------------------------------------------------------- | --------------- |
| [uint2](/engine/6000.7/script-reference/unity/mathematics/uint2.md) | The hash result |
