芝麻web文件管理V1.00
编辑当前文件:/home/qrafawbu/kwesioben.com/paymoney/vendor/mdanter/ecc/src/Random/RandomNumberGenerator.php
adapter = $adapter; } /** * @param \GMP $max * @return \GMP */ public function generate(\GMP $max): \GMP { $numBits = NumberSize::bnNumBits($this->adapter, $max); $numBytes = (int) ceil($numBits / 8); // Generate an integer of size >= $numBits $bytes = random_bytes($numBytes); $value = $this->adapter->stringToInt($bytes); $mask = gmp_sub(gmp_pow(2, $numBits), 1); $integer = gmp_and($value, $mask); return $integer; } }