Cartalyst\Sentinel\Hashing\Hasher::createSalt PHP Méthode

createSalt() protected méthode

Create a random string for a salt.
protected createSalt ( ) : string
Résultat 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;
    }