Hola que tal,
e estado intentado convertir un integer a un hexadecimal, que de como resultado:
Código:
[size - 16]
08 2A 65 13 42 65 98 22 45 00 00 00 00 00 00 00 // por que no corresponde el valor integer al este hexa
El valor integer que utilizo es 256312456892254
por ejemplo si yo convierto string a HEX:
Código Delphi
[-]function StringToHex(S: String): string;
var I: Integer;
begin
Result:= '';
for I := 1 to length (S) do
Result:= Result+IntToHex(ord(S[i]),2);
end;
function HexToString(H: String): String;
var I: Integer;
begin
Result:= '';
for I := 1 to length (H) div 2 do
Result:= Result+Char(StrToInt('$'+Copy(H,(I-1)*2+1,2)));
end;
y luego trato de pasar hex a string me genera un un hexa diferente.
utilizo el siguiente archivo.
UBigIntsV3.rar
Código Delphi
[-]function StrHexaToUInt64Str(const stringHexadecimal: String): string;
var
unBigInteger:TInteger;
begin
unBigInteger:=TInteger.Create;
try
unBigInteger.AssignHex(stringHexadecimal);
Result:=unBigInteger.converttoDecimalString(false);
finally
unBigInteger.free;
end;
end;
Como hago para generar el mismo hexadecimal. lo que trato de hacer encontrar una función que genere lo mismo.
yo desconozco que función utilicen para generar ese raro valor hexadecimal con integer de 15
gracias por su respuesta