tbytes 转 十六进制 string
function Bytes2HexStr(buf: TBytes; len: Integer): AnsiString;
begin
SetLength(Result, len*2); BinToHex(@buf[0], PAnsiChar(Result), len);
end;
procedure TForm1.FormCreate(Sender: TObject);
var
bf: TBytes; Str: AnsiString;
begin
bf := BytesOf('5677899090jjnm,nAB0098CDEFG'); rStr := Bytes2HexStr(bf, Length(bf)); ShowMessage(rStr);
end;