The keystore script is something I use internally for storing logins and other info not to be committed in repos. The structure is here if you're interested, though you'll probably want to just substitute for your own credential storage, or the values directly.
Where is keystore.php available?