Random Password - PHP





-12
Date Submitted Mon. Oct. 9th, 2006 7:29 AM
Revision 1 of 1
Helper BrandonReese
Tags MD5 | Password | PHP | Random
Comments 5 comments
This is a quick and easy method to generate a somewhat random password. This simply generates the MD5 hash for the integer returned by the time() function and then truncates it to the specific length.

<?

$pwLength = 8;

$pw = substr( md5( time() ) , 0, $pwLength );

?>
 

Comments

Comments Predictable seeds: easy
Mon. Oct. 9th, 2006 8:37 AM    Scripter sehrgut
Comments I'm not liking this.
Mon. Oct. 9th, 2006 7:59 AM    Helper shell
Comments True
Mon. Oct. 9th, 2006 9:14 AM    Helper BrandonReese
Comments Poor results
Mon. Oct. 9th, 2006 8:09 AM    Beginner rdivilbiss
  Comments See above
Mon. Oct. 9th, 2006 8:14 AM    Helper shell

Voting