Microsoft.Protocols.TestTools.StackSdk.RemoteDesktop.Rdpbcgr.RdpbcgrDecoder.ParseTsSecurityHeaderFips C# (CSharp) Method

ParseTsSecurityHeaderFips() private method

Parse TS_SECURITY_HEADER (FIPS) (parser index is updated according to parsed length)
private ParseTsSecurityHeaderFips ( byte data, int &currentIndex ) : TS_SECURITY_HEADER
data byte data to be parsed
currentIndex int current parser index
return TS_SECURITY_HEADER
        private TS_SECURITY_HEADER ParseTsSecurityHeaderFips(byte[] data, ref int currentIndex)
        {
            TS_SECURITY_HEADER2 header = new TS_SECURITY_HEADER2();

            // TS_SECURITY_HEADER2: flags
            header.flags = (TS_SECURITY_HEADER_flags_Values)ParseUInt16(data, ref currentIndex, false);

            // TS_SECURITY_HEADER2: flagsHi
            header.flagsHi = ParseUInt16(data, ref currentIndex, false);

            // TS_SECURITY_HEADER2: length
            header.length = (TS_SECURITY_HEADER2_length_Values)ParseUInt16(data, ref currentIndex, false);

            // TS_SECURITY_HEADER2: version
            header.version = ParseByte(data, ref currentIndex);

            // TS_SECURITY_HEADER2: padlen
            header.padlen = ParseByte(data, ref currentIndex);

            // TS_SECURITY_HEADER2: dataSignature
            header.dataSignature = GetBytes(data, ref currentIndex,
                ConstValue.TS_SECURITY_HEADER_DATA_SIGNATURE_LENGTH);

            return header;
        }
RdpbcgrDecoder