Click here to Skip to main content
15,899,475 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
How can I write a simple Encryption And Decryption of a data connection in Asp.Net?
Posted
Comments
ZurdoDev 13-May-13 10:24am    
Use the using System.Security.Cryptography classes.

1 solution

You don't need to hand-roll your own stuff for this:
Encrypting and Decrypting Configuration Sections[^]. This is transparent from the code point of view: you encrypt the information in the web.config and the framework decrypts it for you when you access it.

You might need to consider making an exportable key if using a web-farm.
 
Share this answer
 
v2
Comments
Sergey Alexandrovich Kryukov 13-May-13 10:39am    
5ed.
—SA

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900