Source Code



Crypting with Xor

  • anonymous
  • Jan 16' 14
  • Delphi
  • 203
  • 159
  • United States
function TForm1.Cript (Stringa : String; cripting : boolean): String;
Var
  i,k : integer;
begin

   if Cripting then
   begin
      for i := 1 to Length(Stringa) do
      begin
         result := result + IntToHex((Ord(Stringa[i]) xor i),2);
      end;
   end
   else
   begin
      for i := 1 to Length(Stringa) div 2 do
      begin
         result := result + Chr(StrToInt('$' + Copy((Stringa),k,2)) xor i);
         k := k + 2;
      end;

   end;

end;
  • Tags : string, text
comments powered by Disqus

Related Code

Make the dektop icon text transparent

Export a MS Word Table to a TStringGrid

Money to Text



Category

Tag Linked