public function generate()
    {
        $str     = '';
        $keysize = strlen($this->_alphabet);

        for ($i = 0; $i < $this->_length; ++$i) {
            $str .= $this->_alphabet[\Sodium\randombytes_uniform($keysize)];
        }

        return $str;
    }
public function generate()
    {
        $str     = '';
        $keysize = strlen($this->_alphabet);

        for ($i = 0; $i < $this->_length; ++$i) {
            $str .= $this->_alphabet[\Sodium\randombytes_uniform($keysize)];
        }

        return $str;
    }
public function generate ( ) { $ str = '' ; $ keysize = strlen ( $ this -> _alphabet ) ; for ( $ i = 0 ; $ i < $ this -> _length ; ++ $ i ) { $ str .= $ this -> _alphabet [ \ Sodium \ randombytes_uniform ( $ keysize ) ] ; } return $ str ; }
Generates a new identifier.
@return string generated identifier
Generates a new identifier .