Cartalyst\Sentinel\Hashing\Hasher::createSalt PHP Method

createSalt() protected method

Create a random string for a salt.
protected createSalt ( ) : string
return string
    protected function createSalt()
    {
        $pool = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ./';
        $max = strlen($pool) - 1;
        $salt = '';
        for ($i = 0; $i < $this->saltLength; ++$i) {
            $salt .= $pool[random_int(0, $max)];
        }
        return $salt;
    }