Author: hallojatin | Posted on: 2/12/2011 8:14:03 AM | Views : 296

Hi,
I am working on encryption and decryption and able to encrypt and decrypt a Text file but not able to do the same for MS Word or any other file other than Text file. I am using a below code.
using System; using System.IO; using System.Security; using System.Security.Cryptography; using System.Runtime.InteropServices; using System.Text; using System.Windows.Forms; /// <summary> /// Summary description for CryptographyAndSecurity /// </summary> public class CryptographyAndSecurity { [DllImport("KERNEL32.DLL", EntryPoint = "RtlZeroMemory")] static extern bool ZeroMemory(IntPtr Destination, int Length); public CryptographyAndSecurity() { } // Function to Generate a 64 bits Key. static string GenerateKey() { // Create an instance of Symetric Algorithm. Key and IV is generated automatically. DESCryptoServiceProvider ...

Go to the complete details ...