I developed a Windows service application and in my app.config file I need to encrypt my password and decrypt in my application.
How can I do this ?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
See Encrypting Passwords in a .NET app.config file to learn how to encrypt entire config sections.
If that’s too much for you, then just use any decent reversible encryption algorithm (like AES, Blowfish) in .NET and store the encrypted username/password as a string in your config and decrypt it when you load the contents from the
app.configfile.There are literally tons of samples out there, e.g. Encrypt/decrypt string in .NET right here on Stackoverflow showing how to use the Rijndael (a.k.a. AES) algorithm for your needs.