ExfileEncryption
Encryption for Exfile files.
Installation
- Add exfile_encryption to your list of dependencies in
mix.exs
:
def deps do
[{:exfile_encryption, "~> 0.0.1"}]
end
- Ensure exfile_encryption is started before your application:
def application do
[applications: [:exfile_encryption]]
end
Usage
exfile_encryption
registers two processors. Each recieves a single argument, key
, with the encryption key.
encrypt
decrypt
Configuration
exfile_encryption
is designed to be used with Exfile’s pre- and post-processing support.
Sample configuration of a backend that uses exfile_encryption
to encrypt files stored on the “store” store
config :exfile, Exfile,
backends: %{
"store" => [Exfile.Backend.FileSystem, %{
directory: "/var/lib/my-store",
max_size: nil,
hasher: Exfile.Hasher.Random,
preprocessors: [{"encrypt", [key: "don't tell anyone!"]}],
postprocessors: [{"decrypt", [key: "don't tell anyone!"]}]
}]
}