public void Decrypt(Stream i, Stream o) { CryptoStream cs = new CryptoStream(i, this._des.CreateDecryptor(), CryptoStreamMode.Read); Stdio.CopyStream(cs, o); //cs.Flush(); cs.Close(); o.Flush(); }
public void Encrypt(Stream i, Stream o) { CryptoStream cs = new CryptoStream(o, this._des.CreateEncryptor(), CryptoStreamMode.Write); Stdio.CopyStream(i, cs); //cs.Flush(); cs.Close(); o.Flush(); }