You are here: hacking technology > encryption decipher > Content
Hot Articles
Recommend Articles
New Articles
Summarizes some encryption algorithm
  Add date: 07/10/2008   Publishing date: 07/10/2008   Hits: 463
Total 8 pages, Current page:1, Jump to page:
 
Before having some are, study explains writes the registration machine-hour to write, some are I rewrite certain brothers' code to come, writes more than many does not advise:

{=======================================================
               The study explains, writes the registration machine some function collection
                         By: Dark night rainbow
========================================================}
function wzwgp (s: string): string; // takes the accumulation value
var i, sum:integer;
begin
   sum:=0; for i:=1 to length(s) do
begin
   sum:=sum+ord(s[i]);
end;
   Result: =inttostr(sum);
end;

function ASCII10ADD (s: string): string; // takes the accumulation value
var i, sum:integer;
begin
   sum:=0; for i:=1 to length(s) do
begin
   sum:=sum+ord(s[i]);
end;
   Result: =inttostr(sum);
end;

function ASCII16ADD (s: string): string; // takes the accumulation value
var i, sum:integer;
begin
   sum:=0; for i:=1 to length(s) do
begin
   sum:=sum+ord(s[i]);
end;
   Result: =inttohex(sum,2);
end;

function float (a:integer): string;
var i:integer;
s:Extended;
begin
s:=0;
i:=1;
for i:=1 to a do
begin
    s:=s + 1/i;
end;
result:=FloatToStr(s);
end;

function float2 (a:integer): string;          // floating point mathematics operation
var i:integer;
s:Extended;
begin
s:=0;
i:=1;
for i:=1 to a do
begin
   if i mod 2 <>0 then
    s:=s + 1/i
    else
    s:=s - 1/i;
end;
result:=FloatToStr(s);
end;

procedure TForm1.Button2Click (Sender: TObject);
begin

   edit2.text:=float2(100);
end;
{+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++}

function StrToBack (s: string): string;    // reverses the string of character
var i:integer;
begin
    for i:=1 to length(s) do
    begin
    result: =s[i]+result;
    end;
end;

{+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++}

function mdistr (str:string; int:integer): string; // takes the string of character the middle part
begin
if int<Length(str)div 2 then
result:=copy(str, length(str) div 2, int)
else
result:=copy(str, Length(str) div 2-(int-Length(str) div 2), int);
end;

{+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++}

function StrToASCII16 (s: string): string;      // string of character transforms the ascii code 16 to enter the system
var i:integer;
begin
    for i:=1 to length(s) do
    begin
    result: = result + IntToHex(ord(s[i]),2);
    end;
end;

{+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++}

 
Other pages: : 1 * 2 * 3 * 4 * 5 * 6 * 7 * 8 * Next>>
Prev:Teaches you to use IAT hook to realize the windows universal code back door Next:Teaches you a few words to let OBLOG deliver the user password little darling

Comment:

Category: Home > encryption decipher