First off sha1, turns any words no matter how long into a 32 character key. Ok so you would set a basic sha1 statment like this:
Not true, sha1 returns a 40 character key, md5 returns 32. I wonder why nobody corrected this earlier?
Posted 05 August 2007 - 05:47 PM
First off sha1, turns any words no matter how long into a 32 character key. Ok so you would set a basic sha1 statment like this:
Posted 07 August 2007 - 05:33 PM
I thought my way was overkill. That method goes beyond overkill into a realm of it's own. Not to mention it's a performance nightmare. It might not matter with only 50 users a day, but, depending on what else you have in your code, that would seriously slow it down.I always find a safe way to do this is:
md5(md5(sha1(md5($pass))));
It starts inwards to outwards, so md5 the password, sha1 that hash, md5 that hash, then md5 it again.
Lol, i never know how many characters where in a sha1 string. I knew it was more than 32, but i wasn't paying attentionFirst off sha1, turns any words no matter how long into a 32 character key. Ok so you would set a basic sha1 statment like this:
Not true, sha1 returns a 40 character key, md5 returns 32. I wonder why nobody corrected this earlier?
Posted 08 August 2007 - 04:25 PM
I thought my way was overkill. That method goes beyond overkill into a realm of it's own. Not to mention it's a performance nightmare. It might not matter with only 50 users a day, but, depending on what else you have in your code, that would seriously slow it down.I always find a safe way to do this is:
md5(md5(sha1(md5($pass))));
It starts inwards to outwards, so md5 the password, sha1 that hash, md5 that hash, then md5 it again.
Posted 12 August 2007 - 02:02 PM
Posted 09 September 2007 - 12:58 PM
function sv1($str) { $md5 = md5($str); $sha1 = sha1($str); $newpass = ""; for($i=0; $i<strlen($sha1); $i++) { $newpass .= substr($md5, $i, 1).substr($sha1, $i, 1); } return $newpass; }I like his idea of keeping it simple but wanted to add a little twist to it.
Edited by SpatialVisionary, 09 September 2007 - 12:58 PM.
Posted 09 September 2007 - 10:14 PM
Posted 10 September 2007 - 02:12 PM
Posted 10 September 2007 - 09:45 PM
Posted 16 September 2007 - 01:11 PM
Posted 09 November 2007 - 03:53 PM
Edited by Wildhoney, 09 November 2007 - 03:54 PM.
Posted 11 December 2007 - 11:48 AM
0 members, 0 guests, 0 anonymous users