Hola,
si te entendi bien estas funciones te van a servir:
Código Delphi
[-]
function StringToHexa(texto:String; var dato:array of byte):Boolean;
var i : longint;
begin
Result := FALSE;
if trim(texto) = '' then exit;
if Length(texto) = 1 then texto := '0' + texto;
For i := 1 To Length(texto) div 2 do
dato[i - 1] := strtoint('$' + MidStr(texto, (i * 2) - 1, 2));
Result := True;
end;
function HexaToString(dato: array of byte): string;
var i: longint;
begin
Result := '';
for i := 0 To high(dato) do
Result := Result + IntToHex(dato[i], 2);
end;
Saludos
Pablo