src/Tomahawk/Common/Str.php
public static function random($length = 16)
    {
        if (static::supportOpenSSL()) {

            $bytes = static::secureBytes($length);

            if (false !== $bytes) {
                return substr(str_replace(array('/', '+', '='), '', base64_encode($bytes)), 0, $length);
            }
            return false;
        }
        return static::quickRandom($length);
    }
public static function random($length = 16)
    {
        if (static::supportOpenSSL()) {

            $bytes = static::secureBytes($length);

            if (false !== $bytes) {
                return substr(str_replace(array('/', '+', '='), '', base64_encode($bytes)), 0, $length);
            }
            return false;
        }
        return static::quickRandom($length);
    }
Generate a more truly "random" alpha-numeric string.

@param  int $length
@return string|boolean