An Emacs minor mode to hide sensitive information in buffers (passwords) using overlays.
This is not a replacement for a real password manager. Emacs already provides an implementation of the Secret Service API (Gnome Keyring client): secrets.el
But there may be situation when you have to deal with passwords in plain text files. You can further increase security by using GPG: http://blog.bogosity.se/2011/01/12/managing-passwords-using-gnupg-git-and-emacs/
(require 'password-mode)
(add-hook 'text-mode-hook 'password-mode)
There is a prefix regexp used to find the text before the password:
(defcustom password-mode-password-prefix-regexs
'("Password:\s+" "Passwort:\s+"))
There is also a regexp used to find the actual password:
(defcustom password-mode-password-regex
"\\([[:graph:]]*\\)"
When you try to changes a password (hidden by the overlay) an Emacs password prompt is invoked to read the actual password.
Use (password-mode-copy-as-kill)
to copy the next password to the kill-ring
.