INPUT DATA IS NOT A COMPLETE BLOCK........... using AES
protected void PerformDecryption(ICryptoTransform decryptor, string inputFilePath, string outputFilePath)
{
FileStream reader = new FileStream(inputFilePath, FileMode.Open, FileAccess.Read);
FileStream writer = new FileStream(outputFilePath, FileMode.OpenOrCreate, FileAccess.Write);
System.Security.Cryptography.CryptoStream decryptedStream = new System.Security.Cryptography.CryptoStream(writer, decryptor, CryptoStreamMode.Write);
byte[] bites = new byte[1024];
Int32 bitesRead = 0;
Int64 totalBites = 0;
while (!(totalBites >= reader.Length))
{
bitesRead = reader.Read(bites, 0, 1024);
decryptedStream.Write(bites, 0, bitesRead);
totalBites += bitesRead;
}
decryptedStream.Close();
decryptedStream.Dispose();
reader.Close();
reader.Dispose();
writer.Close();
writer.Dispose();
}