rasensio-encrypt
v1.0.0
Published
Dead-simple file encryption: encrypt <file> gives a random-name file, decrypt restores the original.
Readme
rasensio-encrypt
Dead-simple file encryption for the terminal.
encrypt myfile.docx→ prompts for a passphrase, writes a random-name file (e.g.horse-caballo-tent-miracle.tmp) next to the original, prints the new name.decrypt horse-caballo-tent-miracle.tmp→ prompts for the passphrase, restoresmyfile.docx(the original name is stored, encrypted, inside the file).
Encryption is AES-256-GCM with a key derived from your passphrase via scrypt. Wrong passphrase or a tampered file fails loudly — it never writes garbage output.
Install
On this machine (from the repo):
npm install -g /Users/rodrigo/projects/rasensio-encryptOn other machines, either publish once (npm publish from this directory) and then:
npm install -g rasensio-encrypt…or install straight from a copy of this folder / a git URL:
npm install -g git+https://github.com/<you>/rasensio-encrypt.gitUsage
encrypt secret.docx # keeps secret.docx, creates random-name encrypted copy
encrypt secret.docx --rm # same, but deletes the original after encrypting
decrypt luna-brook-faro-acorn.tmp # restores secret.docx (never overwrites; adds " (1)" if it exists)
decrypt luna-brook-faro-acorn.tmp --rm # same, but deletes the encrypted file after decryptingFor scripting, you can set the passphrase via the RASENSIO_PASSPHRASE environment variable instead of the interactive prompt.
Notes
- If you forget the passphrase, the file is unrecoverable. That's the point.
encryptkeeps the original by default; use--rmwhen you want it gone. Note that plain deletion is not secure erasure on modern SSDs.
