//buat database dengan isi (user, pasw, su) type alpha (char) //user := nama user; panjang 10; //pass := password user; panjang input 8; datanya 30; //su artinya super user (true) / user biasa (false); function kacaukan(user, pass : string; su : boolean) : string; var p : array[1..8] of char; i : byte; ack1, ack2 : char; pasw : string; begin for i:=1 to 8-length(trim(pass)) do pass:=pass+' '; for i:=1 to 10-length(trim(user)) do user:=user+' '; // //
pasw:=''; ack1:=' '; ack2:=' '; for i := 1 to 8 do p[i]:= chr(255-ord(pass[i])); ack1 :=chr(5+ord(user[1])); ack2 :=chr(5+ord(user[2])); if su then pasw := p[5]+p[7]+ack1+p[3]+p[1]+p[8]+ack2+p[6]+p[2]+p[4] else pasw := p[6]+p[4]+p[8]+ack2+p[2]+p[7]+p[3]+ack1+p[1]+p[5]; result:=pasw ;
end;
tetap semangat!!! moga terbantu;