Friday, 27 September 2013

Encrypt a password in a preferences/properties file - Java

Encrypt a password in a preferences/properties file - Java

I'm no expert in cryptography, cracking passwords and security. I need to
store in the preferences a password and username for a SQL server that
I'll use to connect the client to the SQL server.
I've been reading around, mostly here in SO but most of them are older
than 2 years and we all know the security world is changing on a fast
pace.
From what I read, I came to the conclusion that most people suggest
hashing the password using SHA-XXX and/or recommend using jasypt to
encrypt and decrypt the password
So my question is what is the most secure way to protect passwords in a
preferences file? Can I just use SHA-512 with salt and save the salt in
the preferences file as well? Is this safe?

No comments:

Post a Comment