src/Utility/Random.php
public static function pwd($length, $chars = null) {
		if ($chars === null) {
			$chars = '234567890abcdefghijkmnopqrstuvwxyz'; // ABCDEFGHIJKLMNOPQRSTUVWXYZ
		}
		$i = 0;
		$password = '';
		$max = strlen($chars) - 1;

		while ($i < $length) {
			$password .= $chars[mt_rand(0, $max)];
			$i++;
		}
		return $password;
	}
public static function pwd($length, $chars = null) {
		if ($chars === null) {
			$chars = '234567890abcdefghijkmnopqrstuvwxyz'; // ABCDEFGHIJKLMNOPQRSTUVWXYZ
		}
		$i = 0;
		$password = '';
		$max = strlen($chars) - 1;

		while ($i < $length) {
			$password .= $chars[mt_rand(0, $max)];
			$i++;
		}
		return $password;
	}
public static function pwd ( $ length , $ chars = null ) { if ( $ chars === null ) { $ chars = '234567890abcdefghijkmnopqrstuvwxyz' ; // ABCDEFGHIJKLMNOPQRSTUVWXYZ } $ i = 0 ; $ password = '' ; $ max = strlen ( $ chars ) - 1 ; while ( $ i < $ length ) { $ password .= $ chars [ mt_rand ( 0 , $ max ) ] ; $ i ++ ; } return $ password ; }
Generates random passwords.

@param int $length (necessary!)
@param string|null $chars
@return string Password
Generates random passwords .