# MISC::GET_HASH_KEY

- **Hash:** `0xFD340785ADF8CFB7`
- **Namespace:** MISC
- **Runtime name (Lua/JS):** `GetHashKey`
- **Side:** client (game native)
- **Name status:** official
- **Documentation:** described
- **Since game build:** 1207
- **URL:** https://natives.borderlinerp.com/natives/MISC/GET_HASH_KEY

## Signature

```c
Hash GET_HASH_KEY(const char* string);
```

## Parameters

- `string` (`const char*`)

## Returns

`Hash`

## Description

Computes a hash for the given string. It is hashed using Jenkins' One-at-a-Time hash algorithm (https://en.wikipedia.org/wiki/Jenkins_hash_function)
Note: this implementation is case-insensitive.

## Usage

### Lua

```lua
local retval = GetHashKey(string)

-- always available, by hash
local retval = Citizen.InvokeNative(0xFD340785ADF8CFB7, string, Citizen.ResultAsInteger())
```

### JavaScript

```js
const retval = GetHashKey(string);

// by hash
const retval = Citizen.invokeNative('0xFD340785ADF8CFB7', string, Citizen.returnResultAnyway(), Citizen.resultAsInteger());
```

### C#

```csharp
int retval = Function.Call<int>((Hash)0xFD340785ADF8CFB7, string);
```

*Sources: alloc8or RDR3 NativeDB.*
