src/CRUDlex/UserSetup.php
public function getSalt($len)
    {
        $chars = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789`~!@#$%^&*()-=_+';
        $l = strlen($chars) - 1;
        $str = '';
        for ($i = 0; $i < $len; ++$i) {
            $str .= $chars[mt_rand(0, $l)];
        }
        return $str;
    }
public function getSalt($len)
    {
        $chars = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789`~!@#$%^&*()-=_+';
        $l = strlen($chars) - 1;
        $str = '';
        for ($i = 0; $i < $len; ++$i) {
            $str .= $chars[mt_rand(0, $l)];
        }
        return $str;
    }
public function getSalt ( $ len ) { $ chars = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789`~!@#$%^&*()-=_+' ; $ l = strlen ( $ chars ) - 1 ; $ str = '' ; for ( $ i = 0 ; $ i < $ len ; ++ $ i ) { $ str .= $ chars [ mt_rand ( 0 , $ l ) ] ; } return $ str ; }
Generates a random salt of the given length.

@param int $len
the desired length

@return string
a random salt of the given length
Generates a random salt of the given length .