Custom Ecto type for encrypting binary data using Tango.Vault.
This type automatically encrypts data when storing to database and decrypts when loading from database. Used for sensitive OAuth tokens and credentials.
Summary
Functions
Encrypts a plaintext string for database storage.
Dumps plaintext data by encrypting it for database storage.
Loads encrypted data from database and decrypts it.
Returns the underlying database type.
Functions
Encrypts a plaintext string for database storage.
Examples
iex> Tango.Types.EncryptedBinary.cast("sensitive_token")
{:ok, "sensitive_token"}
iex> Tango.Types.EncryptedBinary.cast(nil)
{:ok, nil}
Dumps plaintext data by encrypting it for database storage.
Loads encrypted data from database and decrypts it.
Returns the underlying database type.