Click here to Skip to main content
15,886,728 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi all!

I'm developing an application on VB.Net that uses a MySQL database. Currently, I'm looking for a way to avoid storing my database password in my application code. Neither do I want to store it in plain text in the registry.

Now I'm wondering about data encryption in VB.Net; If I implement it, and if anyone get access to the code, will that person also be able to figure out the database password? Is using encryption same as just storing the plain-text in the registry (if the code can be seen)?

What will be the best way to safely hide/store the main password that the application uses to connect to MySQL? (I hope I make myself clear)

Thank you!
Posted

1. Store the connection string in the configuration file and not inside the application
2. Encrypt the configuration file: https://msdn.microsoft.com/en-us/library/dtkwfdky(v=vs.140).aspx[^]
 
Share this answer
 
If your password is somewhere in the code, in plain or encrypted or whatever, someone will find it!
The point is how much the password is worth the effort to find it!
If you don't want that they found something don't put it somewhere outside of your mind (for the moment... up to telepathic disclosures ;)).
 
Share this answer
 
v3

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900