note 74151 added to function.uniqid
| From: | Jason at osu1 dot php dot net | Date: | Tue, 27 Mar 2007 20:10:36 +0000 |
| Subject: | note 74151 added to function.uniqid | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-124854@lists.php.net to get a copy of this message | ||
Neither the pseudo-random number rand() nor the Mersenne Twister algorithms are cryptographically
strong, and this is well known. Simply combining non-cryptographically strong algorithms
doesn't not make a cryptographically strong algorithm either. Mersenne Twister is a fast
algorithm with good k-distribution which will give you numbers for a long time before it repeats
itself. MT, rand(), and MD5 should NOT be used for encryption, or for cookies that that store a
session ID that gives personal information. A simple application where non-collision of session IDs
is highly preferred but not critical, such as storing a user's shopping cart items for when
they return to your site (but not their personal information), IS a good use for the MT, rand() MD5,
uniqid() and combinations thereof.
----
Server IP: 64.71.164.2
Probable Submitter: 71.37.92.99
----
Manual Page -- http://www.php.net/manual/en/function.uniqid.php
Edit -- https://master.php.net/note/edit/74151
Del: integrated -- https://master.php.net/note/delete/74151/integrated
Del: useless -- https://master.php.net/note/delete/74151/useless
Del: bad code -- https://master.php.net/note/delete/74151/bad+code
Del: spam -- https://master.php.net/note/delete/74151/spam
Del: non-english -- https://master.php.net/note/delete/74151/non-english
Del: in docs -- https://master.php.net/note/delete/74151/in+docs
Del: other reasons-- https://master.php.net/note/delete/74151
Reject -- https://master.php.net/note/reject/74151
Search -- https://master.php.net/manage/user-notes.php