Password Safe with Vim and OpenSSL

From Noah.org
Revision as of 18:24, 24 July 2007 by Root (talk | contribs) (New page: category:Engineering Vim actually makes a very nice password safe. All you have to do is allow it to read Triple DES (DES3) encoded files. == Edit des3 encrypted files with Vim == ...)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigationJump to search


Vim actually makes a very nice password safe. All you have to do is allow it to read Triple DES (DES3) encoded files.

Edit des3 encrypted files with Vim

This Vim plugin will allow editing of des3 encrypted files. The file must have .des3 extension The openssl command line tool must be in the path. This will turn off the swap file and .viminfo log.

Install

Put this in your plugin directory and Vim will automatically load it:

   ~/.vim/plugin/des3.vim

You can start by editing an empty unencrypted file with a .des3 extension. When you first write the file you will be asked to give it a password.

Simple password safe

If you edit any file named .auth.des3 (full name, not just the extension) then this plugin will add folding features and an automatic quit timeout.

Vim will quit automatically after 5 minutes of no typing activity (unless the file has been changed).

This plugin will fold on wiki-style headlines with the following form:

   == This is a headline ==

Any notes under the headline will be inside the fold until the next headline is reached. The SPACE key will toggle a fold open and closed. The q key will quit Vim. Create the following example file named ~/.auth.des3:

   == Colo server ==
   username: maryjane
   password: esydpm
   == Office server ==
   username: peter
   password: 4m4z1ng

Then create a bash alias:

   alias auth='view ~/.auth.des3'

Now you can view your password safe by typing "auth". When Vim starts all the password information will be hidden under the headlines. To view the password information put the cursor on the headline and press SPACE.

<include src="http://www.noah.org/engineering/dotfiles/des3.vim" />