english/libraries/joomla/user/helper.php
/**
	 * Generate a random password
	 *
	 * @param   integer  $length  Length of the password to generate
	 *
	 * @return  string  Random Password
	 *
	 * @since   11.1
	 */
Generate a random password
@param   integer  $length  Length of the password to generate

@return  string  Random Password


Generate a random password @param integer $length Length of the password to generate @return string Random Password
public static function genRandomPassword($length = 8)
	{
		$salt = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789";
		$len = strlen($salt);
		$makepass = '';
		$stat = @stat(__FILE__);
		if (empty($stat) || !is_array($stat)) $stat = array(php_uname());
		mt_srand(crc32(microtime() . implode('|', $stat)));
		for ($i = 0; $i < $length; $i ++) {
			$makepass .= $salt[mt_rand(0, $len -1)];
		}
		return $makepass;
	}
public static function genRandomPassword ( $ length = 8 ) { $ salt = " abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789 " ; $ len = strlen ( $ salt ) ; $ makepass = '' ; $ stat = @ stat ( __FILE__ ) ; if ( empty ( $ stat ) || ! is_array ( $ stat ) ) $ stat = array ( php_uname ( ) ) ; mt_srand ( crc32 ( microtime ( ) . implode ( '|' , $ stat ) ) ) ; for ( $ i = 0 ; $ i < $ length ; $ i ++ ) { $ makepass .= $ salt [ mt_rand ( 0 , $ len - 1 ) ] ; } return $ makepass ; }
Generate a random password
 @param   integer  $length  Length of the password to generate
Generate a random password @param integer $length Length of the password to generate