SHA vs md5()

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
LiveFree
Forum Contributor
Posts: 258
Joined: Tue Dec 06, 2005 5:34 pm
Location: W-Town

SHA vs md5()

Post by LiveFree »

Hey All!

Im writing the most secure login script possible for a client and I was getting to wondering ... which is more easily cracked?

sha or md5()

Thanks
User avatar
John Cartwright
Site Admin
Posts: 11470
Joined: Tue Dec 23, 2003 2:10 am
Location: Toronto
Contact:

Post by John Cartwright »

I wouldn't recommend either. Instead SHA256 snipplet by feyd
josh
DevNet Master
Posts: 4872
Joined: Wed Feb 11, 2004 3:23 pm
Location: Palm beach, Florida

Post by josh »

But to answer the question sha is more secure :)
Roja
Tutorials Group
Posts: 2692
Joined: Sun Jan 04, 2004 10:30 pm

Re: SHA vs md5()

Post by Roja »

Tucker wrote:Im writing the most secure login script possible for a client and I was getting to wondering ... which is more easily cracked?

sha or md5()
Precision in language matters here, so forgive me for being pedantic. Neither can be *cracked*. Both can be brute-forced, and md5 has more shortcuts to do so, in addition to having a smaller probability space in the first place.

SHA256 > SHA > MD5.
Post Reply