changing from md5 to sha1,salting
<p>my algorithm looks like this:</p>

<pre><code>$new_password = sha1($salt . $password . $email);
</code></pre>

<p>it works good, but Im trying to change to sha1 since ive heard its better but it wont work. Why is that?</p>

<p>register:</p>

<pre><code>//generate a strong unique salt
$salt = uniqid(mt_rand());

$new_password = sha1($salt . $password . $email);
</code></pre>

<p>and then i rehash it when i log in</p>
