You can also do it with bases (counting on a base of the size of the charset).
SCAR Code:
program New;
const pwlength=3;
//f11 to quit
clear=0; //how often to cleardebug, 0 is never, 1 is always, 2 is 1/2 the time 3 is 1/3 etc
key=false; //wait for you to press f12 before going to next one?
var
chrs:array of string;
chrs_AL,i2,i,tmpi,tmpint:integer;
str:string;
begin
for i:=48 to 90 do //find the keycodes of all chrs you want, here goes min and max
begin
if ((i>57)and (i<65)) then // here goes gaps of what you dont want ex: inbetween numbers and letters
continue;
chrs_AL:=chrs_AL+1;
setarraylength(chrs, chrs_AL);
chrs[chrs_AL-1]:= chr(i);
end;
i:=0;
repeat
if clear<>0 then
if random(clear) = 0 then
cleardebug;
str:='';
tmpi:=i;
for i2:=pwlength downto 1 do
begin
tmpint:=( tmpi div round(pow(chrs_al*1.0,1.0*(i2-1))));
str:= str+ chrs[tmpint];
tmpi:=tmpi-round(tmpint*pow(chrs_al*1.0,(i2-1)*1.0));
end;
writeln(str);
i:=i+1;
if key then
repeat
wait(50);
until isfkeydown(12);
until isfkeydown(11);
end.