private static function make($characters, $length)
    {
        $token = '';

        do {
            $token .= $characters[random_int(0, count($characters) - 1)];
        } while (strlen($token) < $length);

        return $token;
    }
private static function make($characters, $length)
    {
        $token = '';

        do {
            $token .= $characters[random_int(0, count($characters) - 1)];
        } while (strlen($token) < $length);

        return $token;
    }
private static function make ( $ characters , $ length ) { $ token = '' ; do { $ token .= $ characters [ random_int ( 0 , count ( $ characters ) - 1 ) ] ; } while ( strlen ( $ token ) < $ length ) ; return $ token ; }
Make the random string

@param string $characters
@param int $length
@return string
Make the random string