Cryptography

why only 10 iterations? Why not 100? or 1000? Probably any higher will start getting really cost inefficient if 1000 isn't already.

Oh also, your code won't work the way you want it to. I just saw that the same line md5($Hash) is just going to be stored in $F over and over. It's not actually running the function each time and storing the results to be run in the next iteration.

hold on let me figure this out...

maybe like this?
Code:
$Hash = md5 ( $SALT . $entered_password )
While ( $i <= "10" ) {
$Hash = md5 ( $Hash );
$i++
}
Forgive me, i don't know the language you're coding this in. I'm assuming you can do this in PHP.

I think I see what you were trying to do. You thought that $Hash is storing the function md5($SALT . $entered_password) but it is only storing the results returned by that function.
you'd need to use

while($i <= 10){

and because otherwise it's looking for $i as a string and not an integer :D
 
Back
Top Bottom