I going to create a service where people administer the game servers and to administrate the server I need the admin password to run commands to the server.
So I need to save the password with server ip and admin port in a database where I can get out the password and use it when the user wants to do some command to the server.
How I can do this as security as possible? I don’t want to save it in plain text in the database and I don’t want it to be easy to get the password from the saved hash value if someone gets the database.
I working in ASP.NET MVC 3, C# and MySQL as database.
have a look at this link. Triple DES encryption can be encrypted and decrypted using a key. your program will encrypt on the way up and decrypt the DB value when needed. if you want to really be secure you could look into using a salt