# `Apero.Crypto.Random`
[🔗](https://github.com/Lorenzo-SF/apero/blob/3.0.0/lib/apero/crypto/random.ex#L1)

Random generation utilities for cryptographic purposes.

Provides secure random generation for keys, tokens, passwords, and
timing-safe comparison.

# `generate_key`

```elixir
@spec generate_key() :: binary()
```

Generates a random 256-bit key.

# `random_hex`

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

Generates a random hex string.

# `random_password`

```elixir
@spec random_password(
  non_neg_integer(),
  keyword()
) :: binary()
```

Generates a random password with configurable length and character sets.

# `random_token`

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

Generates a random URL-safe token.

# `secure_compare`

```elixir
@spec secure_compare(binary(), binary()) :: boolean()
```

Timing-safe string comparison.

---

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