Re: ШИфровка
держи еще алгоритм
// Кодирование текста по юину
function code(text:string):string;
var i,u,ui:integer;
s,username:string;
begin
ui:=0;
u:=0;
//if length(username)<=2 then username:='6j0';
username:='119845609234971203909238472304964562039 486293846982340345897097543';
for i:=0 to length(text)-1 do begin
if u>=5 then u:=0;
u:=u+1;
if ui>=length(username) then ui:=0;
ui:=ui+1;
s:=s+chr(ord(getchar(text,i))-u-trunc(ord(getchar(username,ui))/60));
end;
code:=s;
end;
// декодирование текста по юину
function decode(text:string):string;
var i,u,ui:integer;
s,username:string;
begin
ui:=0;
u:=0;
//if length(username)<=2 then username:='6j0';
username:='119845609234971203909238472304964562039 486293846982340345897097543';
for i:=0 to length(text)-1 do begin
if u>=5 then u:=0;
u:=u+1;
if ui>=length(username) then ui:=0;
ui:=ui+1;
s:=s+chr(ord(getchar(text,i))+u+trunc(ord(getchar( username,ui))/60));
end;
decode:=s;
end;
//************************************************** ********
|