# `Strongbox.Schema`
[🔗](https://github.com/hattoriai/strongbox/blob/v0.1.0-dev/lib/strongbox/schema.ex#L1)

Encrypted fields and blind indexes in a schema, always redacted.

    defmodule MyApp.User do
      use Ecto.Schema
      use Strongbox.Schema, vault: MyApp.Vault

      schema "users" do
        field :name, :string
        encrypted_field :email, as: :string
        encrypted_field :born_on, as: :date
        blind_index :email_index, of: :email, normalize: [:trim, :downcase]
      end
    end

`encrypted_field/2` is `field(name, Strongbox.Encrypted, opts)` and
`blind_index/2` is `field(name, Strongbox.Index, opts)`, each with the
vault given to `use` and `redact: true`, so the values never show when
the struct is inspected. Options are those of `Strongbox.Encrypted` and
`Strongbox.Index`; a `:vault` among them takes the place of the one
given to `use`.

# `blind_index`
*macro* 

A blind index of an encrypted field: see `Strongbox.Index` for its
options. `:of` names the field it indexes.

# `encrypted_field`
*macro* 

An encrypted field: see `Strongbox.Encrypted` for its options.

---

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