-1

I've read several posts but I've yet to find something that helps me.

I've got a simple C# winforms application that connects to a SQL DB. What I want to do is to encrpyt this string and decryt it on the fly. I've found this thread which does what I want - Encrypting & Decrypting a String in C#

but .... where to I then store the key/saltkey? Any help would be great!

Community
  • 1
  • 1
jbmintjb
  • 161
  • 1
  • 10
  • Ideally, you should put it in your app.config file and either encrypt the config section or the connection string value on its own. – Arian Motamedi Nov 10 '15 at 22:28

1 Answers1

0

You have to put your connection string in app.config, then you should encrypt your config file, please refer to this article to find more details

Bilel Chaouadi
  • 903
  • 1
  • 10
  • 28
  • Thank you for this, I didn't find that article last night. Looks like it'll do exactly what I want. – jbmintjb Nov 11 '15 at 08:29