Use built-in random_bytes functionality

This commit is contained in:
Tux
2016-08-19 10:40:12 -04:00
committed by Dylan K. Taylor
parent b16f7e4dd5
commit 8e9a078ff9
5 changed files with 12 additions and 104 deletions

View File

@ -450,7 +450,7 @@ namespace pocketmine {
@define("ENDIANNESS", (pack("d", 1) === "\77\360\0\0\0\0\0\0" ? Binary::BIG_ENDIAN : Binary::LITTLE_ENDIAN));
@define("INT32_MASK", is_int(0xffffffff) ? 0xffffffff : -1);
@ini_set("opcache.mmap_base", bin2hex(Utils::getRandomBytes(8, false))); //Fix OPCache address errors
@ini_set("opcache.mmap_base", bin2hex(random_bytes(8))); //Fix OPCache address errors
if(!file_exists(\pocketmine\DATA . "server.properties") and !isset($opts["no-wizard"])){
new Installer();