BizTalk Utilities CV ,   Jobs ,   Code library
 
Home Page


Add/Edit your code items
Search the code library
Browse for the code library


.NET and XML
XInclude.NET 1.0
EXSLT.NET 1.0
How to read a XML file using XmlTextReader?
How to compare a XML element with XmlTextReader?
How to verify if an element is empty with XmlTextReader and IsEmptyElement?
How to check if the XML elements contains any attributes with XmlTextReader
How to avoid to read the XML declaration with XmlTextReader?
How to create a XML file with XmlTextWriter?
Is it possible to add attributes with XmlTextWriter?
How to Write a Comment to a XML File with XmlTextWriter and WriteComment?
How to add the XML Declaration with XmlTextWriter and WriteStartDocument?
How to use Indentation in XmlTextWriter?
What is the usage of WriteFullEndElement and how do I use?
How to include a CData block with XmlTextWriter and WriteCData?
How to write raw XML with XmlTextWriter?
How to add a namespace with the XmlTextWriter and WriteStartAttribute?
How to create a new xml file with XmlDocument?
How to create a xml on the fly?
How to use the Item property in XmlTextReader?
How to Create a Comment with XmlDocument and XmlComment?


 
 

<< XSLT 


By Frank Fang
First Posted 04/18/2003
Times viewed 279

Symmetric Encryption/Decryption with .NET


Summary A .NET C# class for data encryption/decrytion

Microsoft .NET System.Security.Cryptography.SymmetricAlgorithm is very easy to use. Unfortunately, the sample code on Microsoft web site requires to read/write the original data and the result to a file, which in a lot of situations you don't want or you cannot. The attached code uses .NET System.IO.MemoryStream instead. Therefore, you may use this class anywhere, whether on a web server as for web services or ASP.NET or on a client machine, etc. The class code is an updated version of what I posted on CodeProject.com. Since it is very difficult to update an already posted article on that site, I choose to post it here. Please contact me if you have any questions or suggestions. Enjoy!

Additional information


Rate this article on a scale of 1 to 10 (0 votes, average 0)

Your vote :  

<< XSLT 





Leave a comment for this article
Your name
Your email (optional)
Your comment
Optional: Upload an attachment
Enter the code shown:

 
 

    Email TopXML