Guides to using encrypted credentials?

I recently started writing a Slack bot for work. There are a whole bunch of credentials for the Slack bot to use the Slack API. I’d like to store them in a TOML file, but I don’t know what’s the correct way to go about encrypting anything. (In particular, I don’t know where will be the right place to store whatever key would ultimately decrypt everything.)

Does anyone have any advice for storing credentials for a program to use? Specific advice for how to do this for Julia programs would also certainly be welcome.


I know its been a while, did you ever find a solution to the problem? Thx. J.

I made some code to store encrypted credentials in a JSON file a few weeks ago, if you are interested then I could find it and send it to you. But I am not a security expert, so be critical of it if you do.

Thanks for this, I did eventually get a solution with lots of help here and SO. Hiding credentials