sudo vi /usr/local/bin/passphrase
Enter this into the editor:
python -c "import hashlib,getpass,hmac,os;os.popen('pbcopy','w').write(hmac.new(getpass.getpass('Password: '),raw_input('Token: '),hashlib.sha256).digest().encode('base64')[:10])"
Save it, then sudo chmod 755 /usr/local/bin/passphrase.

Now, need a passphrase? Run passphrase, entering your one global password. For token, use the site's name, and it will be merged with your password to form a hashed value unique to the site, ALREADY IN YOUR CLIPBOARD. (Just paste into some editor to see it).
To see the actual author, see http://blog.wearpants.org/better-passwords-in-under-200-characters.
Back