public override void Write(byte[] buffer, int offset, int count) { if (this.mode == CryptoStreamMode.Write) { this.hashAlg.TransformBlock(buffer, offset, count, buffer, offset); } base.Write(buffer, offset, count); } }