Delphi-PRAXiS
Seite 3 von 3     123   

Delphi-PRAXiS (https://www.delphipraxis.net/forum.php)
-   Sonstige Fragen zu Delphi (https://www.delphipraxis.net/19-sonstige-fragen-zu-delphi/)
-   -   Delphi Visual Basic VS Delphi -> String Encode / Decode (https://www.delphipraxis.net/21562-visual-basic-vs-delphi-string-encode-decode.html)

agm65 4. Mai 2004 22:30

Re: Visual Basic VS Delphi -> String Encode / Decode
 
man es läuft genau wie im vb ...ihr seit spitze ! !! YIPPI ! ...hoffentlich schaffe ich die decode alleine .....*freu*

MrSpock 4. Mai 2004 22:39

Re: Visual Basic VS Delphi -> String Encode / Decode
 
Hallo agm65,

für Hilfe beim Decode musst du aber noch Zuckerkuchen besorgen. Vielleicht mit Kaffee oder so, weil mit Bier :cheers: ...

agm65 4. Mai 2004 22:42

Re: Visual Basic VS Delphi -> String Encode / Decode
 
hehe lol okay...hab alles organisiert ...habs versucht ...aber nicht geschafft ..ist doch nicht so leicht trotz perfect laufender encode function....darf ich euch nochmal um eure hilfe bitten :)

dann geb ich ne runde aus, für alle :) !

agm65 4. Mai 2004 23:02

Re: Visual Basic VS Delphi -> String Encode / Decode
 
so gehts :) ! habs danke !

Delphi-Quellcode:
Function Decode(What: String): String;
var Zeile, PW, Crypt: String;
    P, k, NewChar: Integer;
    zeichen, Z2: Char;
begin
  Zeile := What;
  Crypt := '';
  PW := 'Password' ;
  P := 0;
  k := 0;
  while not(Length(Zeile) = P) do
  begin
   k := k + 1;
   P := P + 1;


   if k = Length(PW) Then k := 1;
   Z2 := copy(PW, k, 1)[1];
   if Z2 = ' ' then
   begin
     Z2 := copy(PW, k + 1, 1)[1];
     k := k + 1;;
   end;
   Zeichen := copy(Zeile, P, 1)[1];
   NewChar := ord(Zeichen) - ord(Z2);
   If NewChar < 0 Then NewChar := NewChar + 255;
   Crypt := Crypt + Char(NewChar);
  end;
  result := Crypt;

End;
[edit=MrSpock]Code Tags durch Delphi Tags ersetzt. Mfg, MrSpock[/edit]

SirThornberry 4. Mai 2004 23:07

Re: Visual Basic VS Delphi -> String Encode / Decode
 
na toll, habs auch gerade fertig :(

agm65 4. Mai 2004 23:12

Re: Visual Basic VS Delphi -> String Encode / Decode
 
tut mir leid....gibt trotzdem freibier für alle !

die funktion ist echt top und läuft genau wie in vb..habt dank !
könnt beide (en & decode) bei den sources posten wenn ihr wollt !


cu agm65


:cheers: :cheers: :cheers:


Alle Zeitangaben in WEZ +1. Es ist jetzt 05:04 Uhr.
Seite 3 von 3     123   

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024-2025 by Thomas Breitkreuz