Blowfish Crypt confusion
<p>Not sure why but i think i have totally not understood how this works....</p>

<p>I found an example script which had this:</p>

<pre><code>echo crypt('abc123', '$2a$04$saltsaltsaltsaltsaltxx');
</code></pre>

<p>And it claims to give the output:</p>

<pre><code>$2a$04$saltsaltsaltsaltsaltxuK2.MS4sJd6ZjnuS0fp2eenjndo.g4hS
</code></pre>

<p>But when i did it the same code i get:</p>

<pre><code> $2pGiQ0v1IyNY
</code></pre>

<p>As an output... doesn't really explain anything to me so far or why i get a different output to the example i saW?  </p>

<p>I'm trying to get the sale + the hashed password and store them in the user table for each user but I'm not following how to:</p>

<p>a) generate a random salt per user</p>

<p>b) get the salt and the hash password from it to store it ?</p>

<p>c) how you then check it on for example a login page</p>
