请问这段代码的意思?
有段代码不是很明白,出现在登录程序里,不知道是不是验证用户名和密码的,哪位大哥给指点下。
程序代码:public static byte[] Get0xAAMessage(string username, string password)
{
try
{
List<byte> list = new List<byte>();
list.AddRange(new byte[] { 0x29, 0x29, 170, 0, 0, 0 });
list.AddRange(Encoding.Default.GetBytes(username.ToUpper() + "\t" + password));
byte[] collection = new byte[2];
collection[1] = 13;
list.AddRange(collection);
byte[] buff = list.ToArray();
buff[3] = (byte)((buff.Length - 5) / 0x100);
buff[4] = (byte)((buff.Length - 5) % 0x100);
buff[buff.Length - 2] = GetCheckXor(ref buff, 0, buff.Length - 2);
return buff;
}
catch
{
return null;
}
}要是验证用户名和密码的,又是怎么验证的呢?那个0xAA Message是做什么的?感激不尽...




