• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 318
  • Last Modified:

ASP.net 2.0 Encrypt data

I heard that asp.net 2.0 has a new encrpyt and decrypt functions where you don't have to create a DAPI dll and com object.

How do I encrypt and decrypt different strings of data. THIS HAS NOTHING TO DO WITH WEB.CONFIG
0
jui2ce
Asked:
jui2ce
  • 5
  • 2
1 Solution
 
jonorossiCommented:
.NET has always had encrypting, I'm not sure if they added more in .NET 2.0 but these articles provide some examples:
http://www.vbdotnetheaven.com/Code/Jun2003/2002.asp
http://www.developerfusion.co.uk/show/4647/
0
 
jui2ceAuthor Commented:
What is the new .net 2.0 featurs is what I'm looking for. I have the DLL already none of these look as easy as that.
0
 
jonorossiCommented:
There are new XML encryption classes:
http://www.devx.com/dotnet/Article/21564

What do you mean have the DLL? When doing encryption in .NET you should be using the Cryptography namespace as firstly it is easier to use and should be safer.
0
Free learning courses: Active Directory Deep Dive

Get a firm grasp on your IT environment when you learn Active Directory best practices with Veeam! Watch all, or choose any amount, of this three-part webinar series to improve your skills. From the basics to virtualization and backup, we got you covered.

 
jui2ceAuthor Commented:
0
 
jonorossiCommented:
Actually it also adds the X509Certificates and Pkcs in the System.Security.Cryptography namespace. And some security streams but that isn't for encrypting strings. For a complete list of enhancements take a look at:

http://msdn.microsoft.com/msdnmag/issues/06/00/SecurityBriefs/
http://www.theserverside.net/articles/showarticle.tss?id=NewSecurityFeatures
0
 
jonorossiCommented:
The DPAPI uses TripleDES which is supported in the .NET BCL, here is an example:
http://aspalliance.com/536#Page2

Note that Rijndael/AES is better than TripleDES, more information is on this page:
http://www.developerfusion.co.uk/show/4647/3/
0
 
jonorossiCommented:
I attempted to answer jui2ce's question however no reply was made at the end.
0

Featured Post

Veeam and MySQL: How to Perform Backup & Recovery

MySQL and the MariaDB variant are among the most used databases in Linux environments, and many critical applications support their data on them. Watch this recorded webinar to find out how Veeam Backup & Replication allows you to get consistent backups of MySQL databases.

  • 5
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now