Generate really long number.

@param  int $randNumberLength
@return string
487746
private function bigRandomNumber($randNumberLength)
    {
        $randNumber = null;

        for ($i = 0; $i < $randNumberLength; $i++) {
            $randNumber .= rand(0, 9);
        }

        return $randNumber;
    }
1346506
protected static function generateSalt(): string
    {
        $result = '';

        static::validateSaltMinLength();

        $pool = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ';
        $poolSize = strlen($pool);
        for ($i = 0; $i < static::$saltMinLength; $i++) {
            $result .= $pool[rand(0, $poolSize - 1)];
        }

        return $result;
    }
863427
def generate_random_long(signed=True):
    """"""
    return int.from_bytes(os.urandom(8), signed=signed, byteorder='little')
473632
public static function randomNumber($prefix = '4', $length = 8)
    {
        if (function_exists('random_int')) {
            $length = $length - strlen($prefix);
            $result = $prefix;
            while ($length > 0) {
                $result .= static::randomNumberUsingRandomInt('', $length > 9 ? 9 : $length);
                $length -= 9;
            }
            return $result;
        }
        $key = "";
        $pattern = '1234567890';
        for ($i = 0; $i < $length - strlen($prefix); $i++)
        {
            $key .= $pattern[mt_rand(0, 9)];
        }
        return $prefix . $key;
    }
822627
public static String generateSalt(int saltLength) {
		StringBuilder salt = new StringBuilder(saltLength);
		for (int i=0; i<saltLength; i++) {
			salt.append(CHAR_ARRAY[random.nextInt(CHAR_ARRAY.length)]);
		}
		return salt.toString();
	}
1176337
public function serializeLong(int $long = null)
    {
        if (null === $long) {
            // long on 8 bytes always
            $uint8 = array_merge($this->serializeInt(null), $this->serializeInt(0));
        }
        else {
            // prepend size on 4 bytes
            $uint64L = $this->serializeInt($long);
            $uint64H = $this->serializeInt($long >> 32);

            $uint8 = array_merge($uint64L, $uint64H);
            if (($len = count($uint8)) === 8) 
                // job done
                return $uint8;

            // right padding to 8 bytes
            for ($i = 0, $done = 8 - $len; $i < $done; $i++) {
                array_push($uint8, 0);
            }
        }

        return $uint8;
    }
958601
public static function int_rand($length,$one='')
    {
        $str = self::random_pseudo_bytes(32,10,$one);
        $strlen = strlen($str)-1;
        $results = '';
        for($i=1;$i<=$length;$i++){
            $results  .= $str{mt_rand(0,$strlen)};
        }


        return $results;
    }
292421
public function buildLimit()
	{
		$string  = 'LIMIT ';
		$string .= ((!empty($this->start)) ? (int)$this->start . ',' : '');
		$string .= ((!empty($this->limit)) ? (int)$this->limit : '18446744073709551615');

		return $string;
	}
649381
public static function generateRandomAlphaNumericString($length) {
        $chars = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789";
        $size = strlen($chars);

        $randomChars = array();
        for ($i = 0; $i < $length; $i++) {
            $randomChars[] = $chars[mt_rand(0, $size - 1)];
        }

        return implode('', $randomChars);
    }
967499
static function randtime($rand_length = 6)
    {
        list($usec, $sec) = explode(" ", microtime());
        $min = intval('1' . str_repeat('0', $rand_length - 1));
        $max = intval(str_repeat('9', $rand_length));
        return substr($sec, -5) . ((int)$usec * 100) . rand($min, $max);
    }
993241
public static String getRandomString(final int stringLength) {

    StringBuilder stringBuilder = getStringBuild();
    for (int i = 0; i < stringLength; i++) {
      stringBuilder.append(getRandomAlphabetic());
    }
    return stringBuilder.toString();
  }
868670
public static String getRandomNumber(int numberLength, boolean paddingOn) {
        if (numberLength < 1) {
            throw new InvalidFunctionUsageException("numberLength must be greater than 0 - supplied " + numberLength);
        }

        StringBuilder buffer = new StringBuilder();
        for (int i = 0; i < numberLength; i++) {
            buffer.append(generator.nextInt(10));
        }

        return checkLeadingZeros(buffer.toString(), paddingOn);
    }
267356
protected static function generateRandomString($length)
    {
        $characters = static::CHARACTERS;

        $charactersLength = strlen($characters);
        $randomString = '';
        for ($i = 0; $i < $length; $i++) {
            $randomString .= $characters[rand(0, $charactersLength - 1)];
        }

        return $randomString;
    }
873301
public function generateRandomKey(int $length = 32): string
    {
        if ($length < 1) {
            throw new \RuntimeException('First parameter ($length) must be greater than 0');
        }

        // always use random_bytes() if it is available
        if (\function_exists('random_bytes')) {
            return \random_bytes($length);
        }
        throw new \RuntimeException('Function random_bytes not found');
    }
1056678
private function numToString(BigNumber $number) : string
    {
        $output = '';
        while ($number->getValue() > 0) {
            $previousNumber = clone $number;
            $number = $number->divide($this->alphabetLength);
            $digit = $previousNumber->mod($this->alphabetLength);

            $output .= $this->alphabet[(int)$digit->getValue()];
        }

        return $output;
    }
1222178
private function generateSalt()
    {
        $str = '';
        $length = 64;
        $chars = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789!@#$%^&*(){}[]/|`,.?+-_=:;<> ';
        $count = strlen($chars);
        
        while ($length--) {
            $str .= $chars[mt_rand(0, $count - 1)];
        }
        
        return 'base64:' . base64_encode($str);
    }
659547
public function generate($length)
    {
        $realPool = $this->mergePools($this->characterPools);
        $max = (count($realPool) - 1);
        mt_srand();

        $randomString = '';

        for ($i = 0; $i < $length; $i++) {
            $randomString .= $realPool[mt_rand(0, $max)];
        }

        return $randomString;
    }