redbullmarky Posted December 7, 2006 Share Posted December 7, 2006 yeah thats what made me have doubts but i've done a bit of checking around. it seems though (unless i'm being stoooopid and not reading things properly) that the second param of md5 is only available in PHP5, not 4 (which most of the php world are still on) Quote Link to comment Share on other sites More sharing options...
448191 Posted December 7, 2006 Share Posted December 7, 2006 There isn't really much to research. The top two comments in the manual already noted this.Appearantly md5() does a poor job of converting the binary digest to hexidemal, performance wise.Anyone care to try if this goes for hash() too? I'm lazy right now.. It's past midnight over here..bin2hex(hash('SHA256',true)) Quote Link to comment Share on other sites More sharing options...
drifter Posted December 7, 2006 Share Posted December 7, 2006 it only took me a second to add the hash, so I did it. For some reason I do not see the same results. - I ran it about 10 times - 2 times it was 3 times faster. The rest is was basically a dead heat.Not that these .0001 seconds make a difference, but .0001 here in there in a very long script can add up I guess - especially with lots of traffic. Quote Link to comment Share on other sites More sharing options...
448191 Posted December 8, 2006 Share Posted December 8, 2006 Yeah, well I wouldn't know why I'd want to use bin2hex(md5($str,true)) anyway. It requires php5, and from 5.1.2 the hash extention is bundled. Away with md5, in come uncompromised algorithms. Quote Link to comment 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.