Erebus.Schema (Erebus v0.2.0-rc.1) View Source
This module provides convenient macros to define fields in your Ecto model easily.
Usage:
use Erebus.Schema
use Ecto.Schema
embedded_schema do
hashed_encrypted_field(:first)
data_encryption_key()
end
Link to this section Summary
Functions
Defines field dek of type map, which is required for storing encrypted information using Erebus.
Defines three fields
Link to this section Functions
Defines field dek of type map, which is required for storing encrypted information using Erebus.
Please note that if you're using it with a database underneath, this field needs to be of type jsonb underneath.
Defines three fields:
name: virtual field of typestringname_encrypted: field of typebinarystoring encrypted dataname_hash: field of typestring, storing sha512 version of given data, for quick searching
Please note that if you're using it with a database underneath, these fields need to be of type:
name_encrypted:byteaname_hash:text