httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Wagner, Aaron" <aaron.wag...@bankofamerica.com>
Subject RE: [users@httpd] password??
Date Fri, 25 Jun 2004 15:04:00 GMT


function str_makerand () {
	$minlength = 5;
	$maxlength = 10;
	$useupper = 1;
	$usespecial = 0;
	$usenumbers = 1;
	/*
	Author: Peter Mugane Kionga-Kamau
	http://www.pmkmedia.com
	Description: string str_makerand(int $minlength, int $maxlength, bool $useupper, bool $usespecial,
bool $usenumbers)
	returns a randomly generated string of length between $minlength and $maxlength inclusively.
	Notes:
	- If $useupper is true uppercase characters will be used; if false they will be excluded.
	- If $usespecial is true special characters will be used; if false they will be excluded.
	- If $usenumbers is true numerical characters will be used; if false they will be excluded.
	- If $minlength is equal to $maxlength a string of length $maxlength will be returned.
	- Not all special characters are included since they could cause parse errors with queries.

	***********************************************************
	*         Change Log  11.19.03                            *
	***********************************************************
	aw 11.19.03 Removed zero and alpha O from selection choices 

	*/

	$charset = "abcdefghijklmnopqrstuvwxyz";
	if ($useupper)   $charset .= "ABCDEFGHIJKLMNPQRSTUVWXYZ";
	if ($usenumbers) $charset .= "123456789";
	if ($usespecial) $charset .= "~@#$%^*()_+-={}|][";   // Note: using all special characters
this reads: "~!@#$%^&*()_+`-={}|\\]?[\":;'><,./";
	if ($minlength > $maxlength) $length = mt_rand ($maxlength, $minlength);
	else                         $length = mt_rand ($minlength, $maxlength);
	for ($i=0; $i<$length; $i++) $key .= $charset[(mt_rand(0,(strlen($charset)-1)))];
	return $key;
}

Thanx
Aaron N Wagner
PMON Team
eSystems/Server Monitoring



-----Original Message-----
From: Steven Pierce [mailto:pagedev1@speakeasy.net]
Sent: Thursday, June 24, 2004 7:22 PM
To: users@httpd.apache.org
Subject: [users@httpd] password??




Good Evening,

I am setting up a new http system, and I am looking for software that will help generate a
good
password.  I want something that will be secure.  

Anyone know of a good one. I would like it to be free or open source..


Thank you for your time.
Steven


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Mime
View raw message