Question
OT: More about unique random passwords
I have a master list of passwords in a MySQL table.
I want to generate a new random password that is unique.
I am using this markup -
$passwords=array();
$rsPasswordList = mysql_query("SELECT contactPassword FROM
tblcontactdata",$selectData)
or die(mysql_errno()." : ".mysql_error());
for ($j=0; $rec=mysql_fetch_array($rsPasswordList); $j++){
$passwords[]=$rec;
}
$unique='false';
for ($i=0; $unique!='false'; $i++) {
$temp = randomkeys(8); // this is generating a random 8-character p/w
if(!array_key_exists($temp, $passwords)) {
$newPassword = $temp;
}
}
I want to make sure that this is going to produce a unique password. Can
you evaluate that for me, please?
--
Murray --- ICQ 71997575
Adobe Community Expert
(If you *MUST* email me, don't LAUGH when you do so!)
==================
http://www.dreamweavermx-templates.com - Template Triage!
http://www.projectseven.com/go - DW FAQs, Tutorials & Resources
http://www.dwfaq.com - DW FAQs, Tutorials & Resources
http://www.macromedia.com/support/search/ - Macromedia (MM) Technotes
==================
I want to generate a new random password that is unique.
I am using this markup -
$passwords=array();
$rsPasswordList = mysql_query("SELECT contactPassword FROM
tblcontactdata",$selectData)
or die(mysql_errno()." : ".mysql_error());
for ($j=0; $rec=mysql_fetch_array($rsPasswordList); $j++){
$passwords[]=$rec;
}
$unique='false';
for ($i=0; $unique!='false'; $i++) {
$temp = randomkeys(8); // this is generating a random 8-character p/w
if(!array_key_exists($temp, $passwords)) {
$newPassword = $temp;
}
}
I want to make sure that this is going to produce a unique password. Can
you evaluate that for me, please?
--
Murray --- ICQ 71997575
Adobe Community Expert
(If you *MUST* email me, don't LAUGH when you do so!)
==================
http://www.dreamweavermx-templates.com - Template Triage!
http://www.projectseven.com/go - DW FAQs, Tutorials & Resources
http://www.dwfaq.com - DW FAQs, Tutorials & Resources
http://www.macromedia.com/support/search/ - Macromedia (MM) Technotes
==================
