MailKit.Security.Ntlm.TargetInfo.DecodeFlags C# (CSharp) Method

DecodeFlags() static private method

static private DecodeFlags ( byte buffer, int &index ) : int
buffer byte
index int
return int
		static int DecodeFlags (byte[] buffer, ref int index)
		{
			short nbytes = BitConverterLE.ToInt16 (buffer, index);
			int flags;

			index += 2;

			switch (nbytes) {
			case 4:  flags = BitConverterLE.ToInt32 (buffer, index); break;
			case 2:  flags = BitConverterLE.ToInt16 (buffer, index); break;
			default: flags = 0; break;
			}

			index += nbytes;

			return flags;
		}