AshCloak (ash_cloak v0.3.0)

Copy Markdown View Source

An extension for encrypting attributes of a resource.

See the getting started guide for more information.

Summary

Functions

Encrypts and writes to an encrypted attribute.

Functions

cloak(body)

(macro)

encrypt_and_set(changeset, key, value, context \\ nil)

Encrypts and writes to an encrypted attribute.

If the changeset is pending (i.e not currently running the action), then it is added as a before_action hook. Otherwise, it is run immediately

Raises AshCloak.Errors.NoSuchEncryptedAttribute if the attribute is not configured for encryption.