var
m : MD5;
a,i,l:Integer;
s,st,s1,s2,sn:String;
begin
s:='1234567890';
st:='';
for i:=1 to 6 do
begin
Randomize;
st:=st+s[random(10)+1];
end;
m:=MD5.Create;
m.bmsj(st);
s1:=LowerCase(m.MD5bm);
l:=length(s1) div 2;
s2:='';
for i:=1 to l do
begin
if s1[2*i-1]='0' then s2:=s2+s1[2*i] else s2:=s2+s1[2*i-1];
end;
edit2.text:=st+'-'+s2[3]+s2[7]+s2[11]+s2[15];
end;