
Simple password generator
The three passwords below have been generated at random from the mixed-case alphanumeric group of characters. Each 'class' of characters (uppercase, lowercase and numeric) have equal probability of occurring and the characters within each class also occur with equal probability. The default password length is 8 characters.
Y1QiDuTy 7I5UCKb9 cxX88Kzl
Of course, this is easily extensible with symbols or any other range of characters. In fact, the more diverse the character set the better the password provided the use for it will accept non-alphanumeric characters. A future update to this page will include a selector for character sets and password length...
The PHP source code is provided here for the curious, or for those who would like to use this tool in their own projects.
<?php
function create_password($length = 8) {
$options = array(
0 => range('a', 'z'),
1 => range('A', 'Z'),
2 => range('0', '9')
);
for($i=0; $i<$length; $i++) {
$idx = mt_rand(0, count($options)-1 );
$pwd .= $options[$idx][ mt_rand(0,count($options[$idx])-1) ];
}
return $pwd;
}
?>