public void Decrypt(Stream i, Stream o) { CryptoStream cs = new CryptoStream(i, this._aes.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._aes.CreateEncryptor(), CryptoStreamMode.Write); Stdio.CopyStream(i, cs); //cs.Flush(); cs.Close(); o.Flush(); }