nazmy Posted February 22, 2008 Share Posted February 22, 2008 Which one is more secure? Quote Link to comment https://forums.phpfreaks.com/topic/92413-md5-vs-sha-1/ Share on other sites More sharing options...
vicodin Posted February 22, 2008 Share Posted February 22, 2008 There are rainbow tables for both so technically neither are good... my suggestion is to just encrypt it twice. Example: $pass ='blah'; $encrypt = md5($pass); $encrpt2 =md5($encrypt); Quote Link to comment https://forums.phpfreaks.com/topic/92413-md5-vs-sha-1/#findComment-473467 Share on other sites More sharing options...
Daniel0 Posted February 22, 2008 Share Posted February 22, 2008 I'd use SHA-256 with a salt. $encrypted = hash('sha256', $salt . $password); Quote Link to comment https://forums.phpfreaks.com/topic/92413-md5-vs-sha-1/#findComment-473489 Share on other sites More sharing options...
Cep Posted February 22, 2008 Share Posted February 22, 2008 To answer your question SHA-1 is more secure then MD-5 but as mentioned collision tables are now available for both making them less reliable. Go with Daniel0's suggestion but be aware there are higher versions of SHA but the higher you go the more processing is involved. Quote Link to comment https://forums.phpfreaks.com/topic/92413-md5-vs-sha-1/#findComment-473540 Share on other sites More sharing options...
revraz Posted February 22, 2008 Share Posted February 22, 2008 Did you try searching md5 vs sha1? Plenty of articles on the subject. Quote Link to comment https://forums.phpfreaks.com/topic/92413-md5-vs-sha-1/#findComment-473627 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.