0

I know this has been asked many times before, but I can't find the answer I am looking for:

I have a C# application that connects to a MySQL database, currently the username, password and database name are stored in plain text in a .cnf file, which is very insecure.

Is it possible to store the database's password as a hash in the config and pass that instead of the a plain string? This would at least be a bit more secure.

Thanks you.

Swatcat
  • 73
  • 6
  • 21
  • 57

2 Answers2

1

security through obscurity will not work. furthermore, storing as a hash won't work as hashes can't be decrypted and are only used for comparison.

Look here for more information: Safely connect to mySQL database in c#

Community
  • 1
  • 1
invalidusername
  • 912
  • 9
  • 26
0

You could create a new DLL file which just store the credentials. But to change it you will should to compile new version of DLL

Alex Netrebsky
  • 251
  • 1
  • 7