[wp-trac] [WordPress Trac] #28633: Generate better random numbers

WordPress Trac noreply at wordpress.org
Tue Apr 7 01:42:16 UTC 2015


#28633: Generate better random numbers
-------------------------------------------+-----------------------------
 Reporter:  sarciszewski                   |       Owner:
     Type:  enhancement                    |      Status:  new
 Priority:  normal                         |   Milestone:  Future Release
Component:  Security                       |     Version:
 Severity:  normal                         |  Resolution:
 Keywords:  needs-testing has-patch early  |     Focuses:
-------------------------------------------+-----------------------------

Comment (by sarciszewski):

 `wp_external_random_positive_int()` is there to generate a random number
 along a range. If you use bitshifting to get `0..1023` then add the
 minimum (`-1000`), that should be suitable for `(-1000, -10)`.

--
Ticket URL: <https://core.trac.wordpress.org/ticket/28633#comment:42>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list