Welcome Guest, Not a member yet? Register   Sign In
php sha1 function returning wrong value
#4

[eluser]J Maxwell[/eluser]
I couldn't make it work for the life of me - I have no idea why it was hanging like that, but I found an easy and much more secure way around it.

SHA1 is ok, but it is nowhere near as secure as Whirlpool - which gives a 512bit digest and seems to work fine to me. The downside is its a little more CPU heavy, and it needs 128 chars in the database so tables get a bit larger. However, since SHA1 seems to experience collisions in 2^69, and whirlpool is good for 2^120, I figure its a good upgrade.

Code:
$hashed = hash( 'whirlpool', $password.$this->_get_salt() );

John


Messages In This Thread
php sha1 function returning wrong value - by El Forum - 08-20-2010, 08:03 PM
php sha1 function returning wrong value - by El Forum - 08-20-2010, 08:05 PM
php sha1 function returning wrong value - by El Forum - 08-21-2010, 03:32 AM
php sha1 function returning wrong value - by El Forum - 08-21-2010, 04:25 AM



Theme © iAndrew 2016 - Forum software by © MyBB