public override IAsyncResult BeginWrite(byte[] buffer, int offset, int count, AsyncCallback callback, object state) { ThrowIfClosed(); byte[] cryptBuffer = (byte[])buffer.Clone(); hash.TransformBlock(cryptBuffer, offset, count, cryptBuffer, 0); return tempStream.BeginWrite(buffer, offset, count, callback, state); }