public override void Write(byte[] buffer, int offset, int count) { // for it may be chained before CryptoStream, we should write the content for CryptoStream has calculated the hash of the content this.Stream.Write(buffer, offset, count); // Pause here this.waitHandle.Wait(this.cancelToken); }