I am working on a .NET Windows application that will use Process.Start to run another embedded .NET application running on the same PC. I need to transfer database connection information, including user ID and password, to the target application. I am trying to determine if I need to encrypt information before sending.
Assuming that the end-user PC is not compromised, will the connection information be displayed anywhere if I pass it unencrypted in arguments?
Something like this will be OK ...
string myExecutable = "myApp.exe"; string server = "myServer"; string database = "top_secret_data"; string userID = "myUser"; string password = "ABC123"; string dbInfo = string.Format("server={0} database={1} userID={2} password={3}", server, database, userID, password); ProcessStartInfo startInfo = new ProcessStartInfo(myExecutable, dbInfo); Process.Start(startInfo);
Or should I use something like this ...
var crypto = new MySymmetricCryptoLib.Crypto(); string myExecutable = "myApp.exe"; string server = crypto.Encrypt("myServer"); string database = crypto.Encrypt("top_secret_data"); string userID = crypto.Encrypt("myUser"); string password = crypto.Encrypt("ABC123"); string dbInfo = string.Format("server={0} database={1} userID={2} password={3}", server, database, userID, password); ProcessStartInfo startInfo = new ProcessStartInfo(myExecutable, dbInfo); Process.Start(startInfo);
source share