Returns array of pseudo random 32-bit integers
public static randomInts32 ( integer $numInts, callable $cb, integer $pri, boolean $hang = false ) : integer | ||
$numInts | integer | Number of integers |
$cb | callable | Callback |
$pri | integer | Priority of EIO operation |
$hang | boolean | If true, we shall use /dev/random instead of /dev/urandom and it may cause a delay |
return | integer |
/** * Constructor * @return void */ public function init() { parent::init(); Crypt::randomInts32(1, function ($ints) { $this->opts['entropy'] = $ints[0]; echo json_encode($this->opts); $this->finish(); }, 9); $this->sleep(5, true); }