MemoryStream InStream = new MemoryStream(); MemoryStream OutStream = new MemoryStream(); InStream.Write(System.Text.Encoding.Default.GetBytes(parm), 0, System.Text.Encoding.Default.GetBytes(parm).Length); InStream.Position = 0; byte[] buf = new byte[2048]; // Then get your algorithms, and your keys and your CryptoStream as you usually do SymmetricAlgorith sa = SymmetricAlgorith.Create("whatever algorithm name"); sa.IV = System.Text.Encoding.Default.GetBytes(genIV); sa.Key = GetKey(); ICryptoTransform ct = sa.CreateEncryptor(); CryptoStream cs = new CryptoStream(OutStream, ct, CryptoStreamMode.Write); // now process your buffer int i = InStream.Read(buf, 0, buf.Length); while (i > 0) { cs.Write(buf, 0, i); i = InStream.Read(buf, 0, buf.Length); } cs.FlushFinalBlock(); string EncryptedData = System.Convert.ToBase64String(OutStream.ToArray()); // then close all streams, etc.HTH,