Ver Mensaje Individual
  #4  
Antiguo 03-01-2007
Avatar de seoane
[seoane] seoane is offline
Miembro Premium
 
Registrado: feb 2004
Ubicación: A Coruña, España
Posts: 3.717
Reputación: 24
seoane Va por buen camino
Prueba con esto:
Código Delphi [-]
function Decrypt(Str, Password: string): string;
var
  i: integer;
  S: string;
begin
  S:= EmptyStr;
  for i:= 1 to Length(Password) do
    S:= S + IntToStr(Ord(Password[i]));
  i:= 0;
  Result:= Emptystr;
  while Length(Str) > 0 do
  begin
    i:= (i mod Length(S)) + 1;
    Result:= Result + Chr(StrToInt('$'+Copy(Str,1,2)) xor Ord(S[i]));
    Delete(Str,1,2);
  end;
end;

// Por ejemplo
ShowMessage(Decrypt('74606A780C0C','c'));
Responder Con Cita