# `Kryptex`
[🔗](https://github.com/KaseyCantu/kryptex/blob/v0.1.0/lib/kryptex.ex#L1)

Public API for encrypting/decrypting field payloads.

This package ports the same core mechanism from the Phoenix Ecto encryption
example:

- AES-256-GCM
- random IV on every write
- key id embedded in ciphertext for key rotation
- encryption wired into `Ecto.ParameterizedType`

# `decrypt`

```elixir
@spec decrypt(binary()) :: {:ok, binary()} | {:error, term()}
```

# `encrypt`

```elixir
@spec encrypt(binary()) :: {:ok, binary()} | {:error, term()}
```

---

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