hello Aluigi.
Code:
function XorStr(Stri, Strk: String): String;
var
Longkey: string;
I: Integer;
Next: char;
begin
for I := 0 to (Length(Stri) div Length(Strk)) do
Longkey := Longkey + Strk;
for I := 1 to length(Stri) do
begin
Next := chr((ord(Stri[i]) xor ord(Longkey[i])));
Result := Result + Next;
end;
end;
Function HexToStr(s: String): String;
var
i: Integer;
begin
Result:=''; i:=1;
While i<Length(s) Do
Begin
Result:=Result+Chr(StrToIntDef('$'+Copy(s,i,2),0));
Inc(i,2);
End;
End;
Function DecryptIEDownManag(Pwd:String):String;
Begin
Result:=XorStr(HexToStr(Pwd),HexToStr('0xF'));
END;
echo 7b6a7c7b | hex2byte - | xor - - 0xf -----> It is working fine Result = 'test'
but
echo 7b6a7c7b | hex2byte - | xor - - 0xf -----------------|
echo 62767f6e7c7c78607d6b | hex2byte - | xor - - 0xf------| > NOT worked. :S