[R] Obfuscate AES password

Luca Cerone luca.cerone at gmail.com
Sun Apr 12 17:11:46 CEST 2015

Hi, I need some help with obfuscating AES key on Windows, Linux and Mac.
I have asked the same question on stackoverflow, but since I didn't
receive any input
I have decided to post it here too. You can find my question at:

The package I am writing interfaces R to various services we have
available in my company and some of these require to receive username
and password.

I ask the credentials to the users during the installation, and save them
in an encrypted using AES from the digest package and writeBin.

This way users don't need to hardcode their credentials and we can share the
code without issues.

The problem is that the AES key is saved as plain text on the machine,
so that an intruder has access to the machine he can easily decrypt the users
profile and get their credentials.

What is the best way to protect the key, so that even if somebody gets
the encrypted file he can't decrypt it easily?

Thanks a lot in advance for the help,

More information about the R-help mailing list