freshprince/weechat-fish — pull request #19 by jakhead (2014-04-03 22:57:49+00:00)
Title: Use secure data feature to secure keys

Finally got around to writing this. I think this makes way more sense than the previous PR I submitted. This way, if using sec.conf for more than fish keys, you don't get prompted multiple times upon starting weechat.

This PR enables encrypting keys via ${sec.data.xxxx} and also provides a command to set a random key. I hope the readme is sufficient, but just in case:

1. Set a passphrase for sec.conf if not already:
`/secure passphrase ********`
2. Set a key for encrypting blowfish keys:
`/secure set fish ********`
3. Tell fish.py where the key is:
`/set fish.secure.key "${sec.data.fish}"`
4. To unset and store in plain text:
`/set fish.secure.key ""`

**OR**
`/blowkey genkey`
Will generate a random key and eliminate steps 2 and 3.

I've tried to handle what errors I could imagine, i.e. setting keys without decrypting sec.conf first etc, but there may be some I missed.