Function crypt_random
Generate a random value.
On 32-bit machines, the largest distance that can exist between $min and $max is 2**31. If $min and $max are farther apart than that then the last ($max - range) numbers.
Depending on how this is being used, it may be worth while to write a replacement. For example, a PHP-based web app that stores its data in an SQL database can collect more entropy than this function can.
Package: Crypt\Random
Copyright: MMVII Jim Wigginton
License: MIT License
Author: Jim Wigginton <terrafrost@php.net>
Located at vendors/phpseclib/Crypt/Random.php
Copyright: MMVII Jim Wigginton
License: MIT License
Author: Jim Wigginton <terrafrost@php.net>
Located at vendors/phpseclib/Crypt/Random.php
Parameters summary
optional |
$min = 0 |
Integer $min |
optional |
$max = 0x7FFFFFFF |
Integer $max |
Return value summary
Integer
|