title: How to generate a Token in Symfony 3.4
body: <p>I have my symfony 2.7 updatet to symfony 3.4. 
  I used in Symfony 2.7 the function generateToken() to create a token for a file upload task. I found just information about <a href="https://symfony.com/doc/2.8/components/security/secure_tools.html" rel="nofollow noreferrer">Securely Generating Random Values
  </a> for symfony 3.4. But how I can integrate it? </p>
  
  <p>can I use the following Statement?</p>
  
  <pre><code> return bin2hex(random_bytes(32));
  </code></pre>
  
  <p><a href="https://i.stack.imgur.com/R2f7I.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/R2f7I.png" alt="generateToken Symfony 2.8"></a></p>