title: How is Symfony FOSUserBundle stores the salt
body: <p>I have a project, which consists of 2 parts, web part and java part, in the web one, i'm using symfony with the <code>FOSUserBundle</code> to manage users, the 2 applications shares the same database. <code>FOSUserBundle</code> uses a slated SHA1 to crypt the password, i would like to be authenticate with the java app, but i couldn't figure out how the salting mecanisme works in symfony.
  In the <code>[Model/User.php][1]</code> class, in the constructor, there is line: </p>
  
  <pre><code>$this-&gt;salt = base_convert(sha1(uniqid(mt_rand(), true)), 16, 36);
  </code></pre>
  
  <p>As we can see here, the salt is generated using a random number <code>mt_rand()</code>,
  I have 2 questions here, if the salt is "random", then in the login process, how a new salt is generated to compare it with the in the database? 
  and is the salt stored somewhere?</p>