//数据异或校验function BytesXor(buffer:array of byte):Integer;var i:integer;begin Result:=$0; for i:=Low(buffer) to High(buffer) do begin result:=result xor buffer[i]; end;end;