bonjour

j ai le programme

Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
 
Function puiss(n1,n2:integer):integer;
var i,cpt:integer;
begin
cpt:=1;
for i:=1 to n2 do
begin
cpt := n1 * cpt;
end;
puiss:=cpt;
end;
 
procedure TForm1.Button1Click(Sender: TObject);
var i,mp:integer;
    ch:string;
begin
 mp:=0;
 ch:=  Form1.Edit1.Text;
 For i:=  1 to length(ch) do
 begin
   mp := mp + (puiss(2,i) * ord(ch[i])-5);
   showmessage(inttostr(mp));
 end ;
 Form1.Edit2.Text := inttostr(mp);
end;
 
end.
pour crypter le nom dutilistauer
et je veut l algorithme contraire pour decrypter le nom user pour je puisse l identifier dans mon programme