note 52372 added to function.sha1
| From: | alex at milivojevic dot org | Date: | Thu, 28 Apr 2005 21:12:53 +0000 |
| Subject: | note 52372 added to function.sha1 | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-88717@lists.php.net to get a copy of this message | ||
Regarding my previous comment, if you want to be on the safe side and use only ASCII printable seeds
(shouldn't matter for SSHA seeds), something like this could be used:
<?php
$salt = substr(base64_encode(pack("H*", sha1(mt_rand()))), 0, 4);
?>
----
Manual Page -- http://www.php.net/manual/en/function.sha1.php
Edit -- http://master.php.net/manage/user-notes.php?action=edit+52372
Delete: added to the manual -- http://master.php.net/manage/user-notes.php?action=delete+52372&report=yes&reason=added+to+the+manual
Delete: bad code -- http://master.php.net/manage/user-notes.php?action=delete+52372&report=yes&reason=bad+code
Delete: spam -- http://master.php.net/manage/user-notes.php?action=delete+52372&report=yes&reason=spam
Delete: useless -- http://master.php.net/manage/user-notes.php?action=delete+52372&report=yes&reason=useless
Delete: other reasons -- http://master.php.net/manage/user-notes.php?action=delete+52372&report=yes
Reject -- http://master.php.net/manage/user-notes.php?action=reject+52372&report=yes
Search -- http://master.php.net/manage/user-notes.php