note 21907 added to function.md5

From: Date: Thu, 30 May 2002 21:56:31 +0000
Subject: note 21907 added to function.md5
Groups: php.notes 
Request: Send a blank email to php-notes+get-31243@lists.php.net to get a copy of this message
Response to anonymous post on 29-May-2002 05:51 The original source I was commenting on was from dgolesny@avo-web.de, not dpiper@stens.com. But, moving on... Yes, your code is roughly what I was talking about. However, there are 95 printable characters, so why constrain yourself to only 65? Turn $rndchr=mt_rand(0,64); into $rndchr=mt_rand(0,95); and then add 32 to the result and print the character directly. Granted this makes for ugly-looking passwords that are hard to type, but that also makes them much more secure. For every character you add to the list of possibilities, you add roughly 60% to the number of possible combinations. -- http://www.php.net/manual/en/function.md5.php http://master.php.net/manage/user-notes.php?action=edit+21907 http://master.php.net/manage/user-notes.php?action=delete+21907 http://master.php.net/manage/user-notes.php?action=reject+21907

« previous php.notes (#31243) next »