Current .Net Version: 2.0.50727
Home
Articles
C# & .Net Framework Reference
Practice C# Online
XML Web Services
RSS Feeds
Code Snippets
T-SQL Scripts
Videos
Valuable Links
Contact Us
Mike's C#, VS.NET and SQL Blog




ROR XML Info.
Visual C# Code Snippets

Click here for information on how to use code snippets in VS.NET (2005+)

Implementing Simple Encryption and Decryption with ProtectedData Class [Code | XML]

Title: Implementing Simple Encryption and Decryption with ProtectedData Class
Shortcut: protecteddata
Description: Demonstrates how to implement simple encryption and decryption of data such as database strings with the new ProtectedData class.
Author: C# .Net Fun - http://www.dotnetfun.com - Michael G.

Declarations:
Literal:
ID: strDBString
Type: System.String
ToolTip: The database string to encrypt.
Default: "Data Source=localhost; User ID=sa; Password=somepassword;"
Literal:
ID: strFileName
Type: System.String
ToolTip: The file name to which encrypted data is saved and read from during decryption.
Default: "ENCDBSTR.bin"
Code View:

XML View:

Open/Save | E-mail | Back
 
COPYRIGHT/DISCLAIMER | CONTACT US