function HexToStr(mHex: string): string;
var
I: Integer;
begin
Result := '';
for I := 1 to Length(mHex) div 2 do
if IsInteger('$' + mHex[I * 2 - 1] + mHex[I * 2]) then
Result := Result + Chr(StrToInt('$' + mHex[I * 2 - 1] + mHex[I * 2]));
end; { HexToStr }
function StrToHex(mStr: string): string;
var
I: Integer;
begin
Result := '';
for I := 1 to Length(mStr) do Result := Result + IntToHex(Ord(mStr[I]), 2);
end; { StrToHex }
var
I: Integer;
begin
Result := '';
for I := 1 to Length(mHex) div 2 do
if IsInteger('$' + mHex[I * 2 - 1] + mHex[I * 2]) then
Result := Result + Chr(StrToInt('$' + mHex[I * 2 - 1] + mHex[I * 2]));
end; { HexToStr }
function StrToHex(mStr: string): string;
var
I: Integer;
begin
Result := '';
for I := 1 to Length(mStr) do Result := Result + IntToHex(Ord(mStr[I]), 2);
end; { StrToHex }