Einzelnen Beitrag anzeigen

Klaus01

Registriert seit: 30. Nov 2005
Ort: München
5.755 Beiträge
 
Delphi 10.4 Sydney
 
#4

Re: Text verschlüsseln ohne kömische Symbole !

  Alt 7. Mai 2008, 12:05
Hallo,

für solche Sachen hat sich eigentlich die Hexdarstellung durchgesetzt.

Delphi-Quellcode:
function strEncrypt(const S: String; Key: Word): String;
  var
    I: Integer;
    dummyKey: Byte;
  const
    C1 = 52845; C2 = 22719;
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;
Grüße
Klaus
Klaus
  Mit Zitat antworten Zitat