thank you :)
can i use CryptoStream?

Product p=new Product();
//stream-this is the stream to the file.
using (MemoryStream ms = new MemoryStream())
                BinaryFormatter msSeri = new BinaryFormatter();
                msSeri.Serialize(ms, p);
                DESCryptoServiceProvider cryptic = new DESCryptoServiceProvider();
                cryptic.Key = ASCIIEncoding.ASCII.GetBytes("ABCDEFGH");
                cryptic.IV = ASCIIEncoding.ASCII.GetBytes("ABCDEFGH");
                CryptoStream crStream = new CryptoStream(ms,cryptic.CreateEncryptor(),CryptoStreamMode.Write);
                byte[] data = ASCIIEncoding.ASCII.GetBytes(ms.ToString());
                BinaryFormatter seri = new BinaryFormatter();
                if (stream != null)
                    seri.Serialize(stream, msSeri.Deserialize(ms));

is this how i'm supposed to do it?

Does CryptoStream implement IDisposable?

If so then wrap that in a using statement too.

So after that, does the code actually work?

seri.Serialize(stream, msSeri.Deserialize(ms));
argument exception in this line-what does it mean?