# `Cartouche.Hash`
[🔗](https://github.com/zenhive/cartouche/blob/main/lib/cartouche/hash.ex#L1)

Keccak-256 helpers for hashing arbitrary binaries.

Returns either the 32-byte binary digest (`keccak/1`) or its unsigned
integer interpretation (`keccak_unsigned/1`).

# `keccak`

```elixir
@spec keccak(binary()) :: &lt;&lt;_::256&gt;&gt;
```

Returns the keccak of the given binary message.

## Examples

  iex> use Cartouche.Hex
  iex> Cartouche.Hash.keccak("test")
  ~h[0x9C22FF5F21F0B81B113E63F7DB6DA94FEDEF11B2119B4088B89664FB9A3CB658]

# `keccak_unsigned`

```elixir
@spec keccak_unsigned(binary()) :: non_neg_integer()
```

Returns the keccak of the given binary message, as an unsigned.

## Examples

  iex> Cartouche.Hash.keccak_unsigned("test")
  70622639689279718371527342103894932928233838121221666359043189029713682937432

---

*Consult [api-reference.md](api-reference.md) for complete listing*
