https://github.com/voltone/aes_crypt
Elixir package for reading and writing files in AES Crypt format
https://github.com/voltone/aes_crypt
Last synced: about 1 year ago
JSON representation
Elixir package for reading and writing files in AES Crypt format
- Host: GitHub
- URL: https://github.com/voltone/aes_crypt
- Owner: voltone
- License: bsd-3-clause
- Created: 2018-11-14T08:31:31.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2018-11-15T06:29:30.000Z (over 7 years ago)
- Last Synced: 2025-03-01T00:12:58.504Z (over 1 year ago)
- Language: Elixir
- Size: 5.86 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# AESCrypt
Read and write files in [AES Crypt format](https://www.aescrypt.com/aes_file_format.html).
## Usage
```elixir
iex(1)> AESCrypt.write("example.aes", "Hello, world!", "supersecret")
:ok
iex(2)> AESCrypt.read("example.aes", "supersecret")
{:ok, "Hello, world!", [{"CREATED_BY", "Elixir AESCrypt v0.1.0"}]}
iex(3)> AESCrypt.read!("example.aes", "supersecret")
"Hello, world!"
```
## Limitations
* The password KDF used by the AES Crypt file format is quite weak by modern
standards, potentially allowing brute-force attacks on the passphrase; this
is a limitation of the file format, not of this implementation; use a strong
passphrase to mitigate the risk, and consider alternative storage formats for
highly sensitive data
* Supports v2 format only
* Decrypts/encrypts entire contents in memory; no streaming
* No attempts are made to protect keying material: the passphrase, derived key,
file-specific key and plaintext may leak in stack traces, crashdumps, or
BEAM introspection functions
## Installation
The package can be installed by adding `aes_crypt` to your list of dependencies
in `mix.exs`:
```elixir
def deps do
[
{:aes_crypt, "~> 0.1.0"}
]
end
```
Documentation can be found at [https://hexdocs.pm/aes_crypt](https://hexdocs.pm/aes_crypt).