2018-04-27 15:00:22 -04:00
|
|
|
<?php
|
2019-03-23 14:27:54 -04:00
|
|
|
if (!function_exists('random_bytes')) {
|
2018-04-27 15:00:22 -04:00
|
|
|
/**
|
|
|
|
* @param int $bytes
|
2019-03-23 14:27:54 -04:00
|
|
|
*
|
2018-04-27 15:00:22 -04:00
|
|
|
* @return void
|
|
|
|
*/
|
|
|
|
function random_bytes($bytes)
|
|
|
|
{
|
2019-03-23 14:27:54 -04:00
|
|
|
throw new \Exception('bad');
|
2018-04-27 15:00:22 -04:00
|
|
|
}
|
|
|
|
}
|
2018-07-03 11:17:52 -04:00
|
|
|
|
2019-03-23 14:27:54 -04:00
|
|
|
if (!function_exists('new_random_bytes')) {
|
2018-07-03 11:17:52 -04:00
|
|
|
/**
|
|
|
|
* @param int $bytes
|
2019-03-23 14:27:54 -04:00
|
|
|
*
|
2018-07-03 11:17:52 -04:00
|
|
|
* @return int
|
|
|
|
*/
|
|
|
|
function new_random_bytes($bytes)
|
|
|
|
{
|
|
|
|
return 5;
|
|
|
|
}
|
|
|
|
}
|