title: Spring security:password-encoder and StandardPasswordEncoder
body: <p>Say I hash passwords with StandardPasswordEncoder which uses SHA-256 and 8bit random characters as a salt and save it to db(for registration form for example).</p>
  
  <p>And then I check it with </p>
  
  <pre><code>&lt;security:password-encoder hash="sha-256" &gt;
  &lt;/security:password-encoder&gt; (for login form)
  </code></pre>
  
  <p>Does this latest knows that the first encoded it in a way that salt is 8 bytes of randomly generated salt? And even if it knows how will it find out what salt to apply to get same hash?</p>
  
  <p>Or maybe I am completely off the track and SHA-256 standard already presumes that there should be strictly 8-bit generated salt inside for hashing?</p>
  
  <p>Thanks,</p>