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

# core::keccak::compute_keccak_byte_array

Computes the Keccak-256 hash of a `ByteArray`.

## Signature

```rust theme={null}
pub fn compute_keccak_byte_array(arr: ByteArray) -> u256
```

#### Arguments

* `arr` - The input bytes to hash

#### Returns

The 32-byte Keccak-256 hash as a little-endian `u256`

## Examples

```rust theme={null}
use core::keccak::compute_keccak_byte_array;

let text: ByteArray = "Hello world!";
let hash = compute_keccak_byte_array(@text);
assert!(hash == 0xabea1f2503529a21734e2077c8b584d7bee3f45550c2d2f12a198ea908e1d0ec);
```
