Magik.EctoType.EncryptedMap (Magik v0.11.0) View Source

An Ecto Type to encrypt map before saving to database and decrypt after loading from database. Map data is encode to string before encrypted. So in database, this field must be defined as text field.

Config key

Generate secret key using: Magik.Crypto.generate_secret

config :magik, :ecto_secret_key, "your key"

Link to this section Summary

Functions

Callback implementation for Ecto.Type.cast/1.

Callback implementation for Ecto.Type.dump/1.

Callback implementation for Ecto.Type.embed_as/1.

Callback implementation for Ecto.Type.equal?/2.

Callback implementation for Ecto.Type.load/1.

Callback implementation for Ecto.Type.type/0.

Link to this section Functions

Callback implementation for Ecto.Type.cast/1.

Callback implementation for Ecto.Type.dump/1.

Callback implementation for Ecto.Type.embed_as/1.

Callback implementation for Ecto.Type.equal?/2.

Callback implementation for Ecto.Type.load/1.

Callback implementation for Ecto.Type.type/0.