Get the tools you need to learn Java skills fast!
Video tutorials, eBooks, hands-on lab exercises, sample code.
Get started
The moose likes Security and the fly likes Properties File Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Badass: Making Users Awesome this week in the Game Development forum!
JavaRanch » Java Forums » Engineering » Security
Bookmark "Properties File" Watch "Properties File" New topic

Properties File

Gary Rather

Joined: Sep 12, 2002
Posts: 8
I read this in one of the post.
To connect to the database I need to have a user/passowrd.
At the moment I have a properties file with username/passowrd as entries.
So what the question is I should encrypt the username/password for sure.
Now I get overwhelmed in my options.
What is the best way to encrypt/decrypt these.
I need a simple encryption so when we create the properties file I have the ecrypted value.
Then in the code need to do the decryption.
Is there a example of this in the book. Seems like a common problem.
Nathan Paris

Joined: Jun 21, 2000
Posts: 28
There are numerous example this in the book. I will let Brian answer any specifics, but I have read through it and encryption as well as the use of properties files are handled in the book as well as in the example code.
I agree. Here's the link:
subject: Properties File