UPDATE (Jan 2019): Read this newer blog post instead https://www.peterbe.com/plog/encrypt-with-emacs-on-macos-ccrypt

With the ccrypt program for Linux and some Emacs settings you can achieve the following:

You create or open a file called passwords.cpt. Then Emacs asks you for a password. Once you've entered the password you can word with the file like any other file to for example write down all your passwords to various websites or bank accounts.

When you close Emacs and try to read the file with any other program you get the binary encrypted output which is useless. What's important to Emacs is that the filename ends in .cpt which is a bit clunky. In vi you can get the same effect simply by passing the -x option when opening a file. But I don't like vi.

Comments

Your email will never ever be published.

Previous:
File attachment widget with Javascript February 25, 2005 Web development
Next:
Suspend and resume output in terminal March 3, 2005 Linux
Related by category:
fnm is much faster than nvm. December 28, 2023 macOS
set -ex - The most useful bash trick of the year August 31, 2014 Linux
Be careful with Date.toLocaleDateString() in JavaScript May 8, 2023 macOS
brotli_static in Nginx November 8, 2024 Linux
Related by keyword:
How to encrypt a file with Emacs on macOS (ccrypt) January 29, 2019 Linux, macOS
Read in passwords with bash March 25, 2005 Linux
Best Atom packages of 2015 January 22, 2016 Web development, macOS
EditArea vs. CodePress January 3, 2008 Web development