How do i create such a thing like a txt file where i can save usernames and passwords? but is protected that only certain users can access and edit the usernames and passwords?

Please help

I tried using a txtfile but i realized anyone can access it...is there anyway of storing protected information for my program? and how do i create a dialog to edit the information also.

So basically:
How do i store a password in a txtfile but where to user can't guess it?
How do i read the password i stored to check if user inputted correct information?

Your help is truly welcomed

Look at encrypting and decrypting the password.
Look at using the javax.crypto package.

No idea how to use it. Best google for some samples

Not sure about using text file to store username + password if it is under Windows. Even Linux would not really support the way you are asking for. Encrypting is one, but it is not that safe if you have a physical file which can be accessed on the storage via other ways besides the application... Do you have any other option, such as using a database management (i.e. mysql, sqlite3, hypersonic, etc)? It would be much easier to deal with that way.

Yes I can use anyway but i am not sure how to use those databases could you lend a hand?

How secure do you want the password?
Protected From Casual looker or skilled programmer?

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.