I always wanted an editor which can help me edit text securely with password protection using which I can easily create, save, edit files on fly. I am sure that there are some editors which can do it. However I felt that instead of an editor, it is better to have an interface which will allow me to edit files using my favorite editor while password protecting it. So I wrote a script called crypt-editor which uses gpg/mcrypt to encrypt and decrypt files enabling users to edit files using any editor.
UsageSay you want to create/open a file using gedit:
You will be asked to enter the passphrase. Then gpg/mcrypt decrypts the file (if already exists) and opens it with gedit. On closing the file gpg/mcrypt encrypts it back and deletes the decrypted file.
crypt-editor gedit [filename]
If you do not specify the editor, the file is opened in vi editor (my favorite so it is default :P)
Complete option list of crypt-editor:
crypt-editor -help crypt-editor [filename] crypt-editor [editor] [filename] crypt-editor [-k key] [filename] crypt-editor [-k key] [editor] [filename] To create new file with mcrypt instead of gpg use -m option crypt-editor -m [filename]
crypt-editor passwords crypt-editor gedit passwords crypt-editor -k pa$$word passwords crypt-editor -k pa$$word gvim passwords
git clone https://github.com/alseambusher/crypt-editor cp crypt-editor/crypt-editor /usr/bin
apt-get install mcrypt