Skip to content

Extract Ecto components to cloak_ecto hex package #77

@danielberkompas

Description

@danielberkompas

Cloak provides enough useful functionality outside of Ecto that it might be useful to have two packages. This would make it possible to rely on Cloak without bringing in Ecto as a dependency, and also make it easier to reuse Cloak in other persistence libraries.

cloak

This package would contain Cipher and Vault. These are the reasons you might use it in addition to :crypto:

  • Vaults provide a standardized way to configure your algorithms and keys
  • Ciphers encapsulate best practices for each algorithm
    • Random IVs
    • Tagged ciphertexts
  • Vaults expose a simpler API for encrypt and decrypt than :crypto
  • Algorithms can be easily swapped, because Vaults can decrypt old cipher text with the an old key and encrypt it with a new key.

cloak_ecto

This package would contain all the Ecto.Type modules, and the mix cloak.migrate task. The task would probably be renamed to cloak_ecto.migrate or similar.

Metadata

Metadata

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions