> ## Documentation Index
> Fetch the complete documentation index at: https://docs.qu.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# keccak256

```ts theme={null}
function keccak256(_data): string
```

Compute the cryptographic KECCAK256 hash of `data`.

The `data` **must** be a data representation, to compute the hash of UTF-8 data use the \[**id**}(../functions/id)
function.

## Parameters

| Parameter | Type                                               | Description       |
| :-------- | :------------------------------------------------- | :---------------- |
| `_data`   | [`BytesLike`](/sdk/content/type-aliases/BytesLike) | The data to hash. |

## Returns

`string`

DataHexstring

The hash of the data.

## Example

```ts theme={null}
keccak256('0x');

keccak256('0x1337');

keccak256(new Uint8Array([0x13, 0x37]));

// Strings are assumed to be DataHexString, otherwise it will
// throw. To hash UTF-8 data, see the note above.
keccak256('Hello World');
```

## Source

[crypto/keccak.ts:44](https://github.com/dominant-strategies/quais.js/blob/c1c12d43f9d34c6baad2b0542bd6d0acd6fefcbf/src/crypto/keccak.ts#L44)
