Delphiturbo
Messages postés68Date d'inscriptionmercredi 31 octobre 2007StatutMembreDernière intervention29 juillet 2008
-
14 mai 2008 à 14:46
Delphiturbo
Messages postés68Date d'inscriptionmercredi 31 octobre 2007StatutMembreDernière intervention29 juillet 2008
-
14 mai 2008 à 16:37
Salut
voila ma Function de Encrypt : function stringEncrypt(const S: String; Key: Word): String;
var
I: Integer;
dummyKey: Byte;
const
C1 55555; C2 22222;
begin
result : = '';
for I := 1 to Length(S) do
begin
dummyKey : =Ord(S[I]) xor (Key shr 8)
Result := result + IntToHex(dummyKey,2);
Key := (dummyKey + Key) * C1 + C2;
end ;
end;
procedure TForm1.Button1Click(Sender: TObject); begin
Edit2.Text: =stringEncrypt(Edit1.text, 1258); // ok
Edit3.Text:= // ici je voudrais prendre le text original de Edit1
end;