void Decode (byte[] message, int startIndex, int length)
{
int offset, count;
ValidateArguments (message, startIndex, length);
Flags = (NtlmFlags) BitConverterLE.ToUInt32 (message, startIndex + 12);
// decode the domain
count = BitConverterLE.ToUInt16 (message, startIndex + 16);
offset = BitConverterLE.ToUInt16 (message, startIndex + 20);
domain = Encoding.UTF8.GetString (message, startIndex + offset, count);
// decode the workstation/host
count = BitConverterLE.ToUInt16 (message, startIndex + 24);
offset = BitConverterLE.ToUInt16 (message, startIndex + 28);
host = Encoding.UTF8.GetString (message, startIndex + offset, count);
if (offset == 40) {
// decode the OS Version
int major = message[startIndex + 32];
int minor = message[startIndex + 33];
int build = BitConverterLE.ToUInt16 (message, startIndex + 34);
OSVersion = new Version (major, minor, build);
}
}