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
jui2ceAsked:
Who is Participating?
 
jonorossiConnect With a Mentor Commented:
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:
.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
Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 
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
 
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:
I attempted to answer jui2ce's question however no reply was made at the end.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.