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