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;
    }