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

AES-256-GCM encrypt/decrypt implementation with key rotation metadata.

Payload format:

    <<version::8, key_id::32, iv::binary-16, tag::binary-16, ciphertext::binary>>

# `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*
