rfc:uniqid

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
rfc:uniqid [2016/09/12 02:49]
yohgaki
rfc:uniqid [2021/07/07 09:30] (current)
cmb RFC is inactive
Line 4: Line 4:
   * Date Modified: 2016-09-12   * Date Modified: 2016-09-12
   * Author: Yasuo Ohgaki <yohgaki@ohgaki.net>   * Author: Yasuo Ohgaki <yohgaki@ohgaki.net>
-  * Status: Under+  * Status: Inactive
   * First Published at: http://wiki.php.net/rfc/uniqid   * First Published at: http://wiki.php.net/rfc/uniqid
  
Line 21: Line 21:
  
   * Current entropy range: About 1 billion   * Current entropy range: About 1 billion
-  * Proposed entropy range: 2^50. About 1048567 billions+  * Proposed entropy range: 2^50 or more. About 1048567 billions.
  
 ===== Proposal ===== ===== Proposal =====
  
 +  * Change "more_entropy" option to int parameter to specify number of entropy chars.
   * Enable "more entropy" option by default.   * Enable "more entropy" option by default.
   * Use php_random_bytes() as entropy source.   * Use php_random_bytes() as entropy source.
 +
 +<code php>
 +  string uniqid([string $prefix [, int $number_of_entropy_chars ]]);
 +</code>
 +
 +Where $number_of_entropy_chars are:
 +
 +  * 0 for disable more entropy. (Compatible with current $more_entropy=FALSE)
 +  * 1 for 10 digits entropy. (Compatible with current $more_entropy=TRUE. About 30 bits entropy)
 +  * 13 to 255 for number of entropy [0-v]{13,255} chars. (13 chars = 65 bits entropy)
 +
  
 == Note on usage == == Note on usage ==
Line 135: Line 147:
 ===== Rejected Features ===== ===== Rejected Features =====
 Keep this updated with features that were discussed on the mail lists. Keep this updated with features that were discussed on the mail lists.
 +
 +===== ChangeLog =====
 +
 +  * Made 2nd parameter a int 
rfc/uniqid.1473648554.txt.gz · Last modified: 2017/09/22 13:28 (external edit)