Blue Theme Orange Theme Green Theme Red Theme
 
Nevron Gauge for SharePoint
Home | Forums | ASP.NET 2.0 Tutorials | Web Services | How Do I...? | Class Browser | WPF Quick Starts | Advertise with Us
 | Consulting  
Submit an Article Submit a Blog 
Search :       Advanced Search »
Home » Blogs Home » Blog Detail

Easy Encrypt and Decrypt Zip

 by Mohammad Mirshahi on Nov 29, 2011

The attached sample code encrypts your file by 16 and 32 key secret and decrypts back by 16 and 32 Key.
Download Files: Easy Encrypt.zip
Comments: 0 Views: 527 Printable Version 
ENC.jpg


The attached sample code encrypts your file by 16 and 32 key secret  and decrypts back by 16 and 32 Key. The algorithm used to encrypt and decrypt is Rijndael. 

The  Rijndael class in .NET Framework is used for this purpose. 


Include  #using System.Security.Cryptography namespace in your project before you can use the class. The sample code looks like the following:


            Rijndael alg = Rijndael.Create();
            alg.Key = pdb.GetBytes(16);

            alg.IV = pdb.GetBytes(16);
            CryptoStream cs = new CryptoStream(ms, alg.CreateEncryptor(), CryptoStreamMode.Write);

            cs.Write(clearBytes, 0, clearBytes.Length);
            cs.Close();
            byte[] encryptedData = ms.ToArray();


ANOTHER LINKS:

http://mfc-project.blogfa.com/post-23.aspx

OR:

http://www.planet-source-code.com/vb/scripts/ShowCode.asp?txtCodeId=7468&lngWId=10


ENJOY IT.

Comment Request!
Thank you for reading this post. Please post your feedback, question, or comments about this post Here.
 
What do you say about this post? Post a comment here
*Title:
*Comment:
 
Comments not available.
Nevron Gauge for SharePoint
Become a Sponsor

 Blogger's Profile
Age: 1988
Location:
Title: Developer
Joined: Sep 11, 2009
Education: Bachelors Degree
 More Blogs from this Blogger
No record available
 Latest Blogs
[Video] OnClose Handler
[Video] Storing and Loading the Window and Toolbar position
The Euclidean Algorithm
Swapping Exe Process
How Exe file is Generated by VS2005 C++ Project?
What is Exe
Header files: Multiple Inclusion problem - Solution B
Header files: Multiple Inclusion problem - Solution A
Header files: Multiple Inclusion problem - Reason
Header files: Multiple Inclusion problem
View all »
 Latest Jobs
More ... 
 Latest Interview Questions
More ... 
Team Foundation Server Hosting
 © 2012  contents copyright of their authors. Rest everything copyright Mindcracker. All rights reserved.