kellyalan Posted March 20, 2014 Share Posted March 20, 2014 Just want to get clarification on what this does and why you'd want it displayed in email output: .bin2hex(mhash(MHASH_MD5, time())) Thanks Link to comment https://forums.phpfreaks.com/topic/287130-code-clarification-bin2hex-mhash/ Share on other sites More sharing options...
Jacques1 Posted March 21, 2014 Share Posted March 21, 2014 Hi, I guess even the author of the code doesn't know what it's for. Where on earth does this come from? The code is an extremely cumbersome way of writing md5(time()) Why would one hash the current Unix time? I have absolutely no idea. Maybe they wanted a fixed length. Or maybe it's a botched security feature. Link to comment https://forums.phpfreaks.com/topic/287130-code-clarification-bin2hex-mhash/#findComment-1473402 Share on other sites More sharing options...
Ansego Posted March 21, 2014 Share Posted March 21, 2014 Hi, I also agree with @Jacques1; Has the explanation in more detail on the php manual: bin2hex Reference: http://www.php.net/manual/en/function.bin2hex.php Mhash Reference: http://www.php.net/manual/en/ref.mhash.php md5 Reference: http://au2.php.net/md5 Link to comment https://forums.phpfreaks.com/topic/287130-code-clarification-bin2hex-mhash/#findComment-1473404 Share on other sites More sharing options...
kellyalan Posted March 21, 2014 Author Share Posted March 21, 2014 Thanks for the replies and links -- I inherited this code and wasn't quite sure why this was used Link to comment https://forums.phpfreaks.com/topic/287130-code-clarification-bin2hex-mhash/#findComment-1473458 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.