phpSensei Posted August 10, 2007 Share Posted August 10, 2007 I have seen many hashing in URL adresses like youtube, google, yahoo, and msn.com I want to know several ways of doing this.. If someone can please show me an example of making your own hash, then I wound be happy. Quote Link to comment https://forums.phpfreaks.com/topic/64329-solved-crazy-md5-hashing/ Share on other sites More sharing options...
LiamProductions Posted August 10, 2007 Share Posted August 10, 2007 you can use the md5 function? Quote Link to comment https://forums.phpfreaks.com/topic/64329-solved-crazy-md5-hashing/#findComment-320690 Share on other sites More sharing options...
phpSensei Posted August 10, 2007 Author Share Posted August 10, 2007 I want A shorter Type of Hashing... Quote Link to comment https://forums.phpfreaks.com/topic/64329-solved-crazy-md5-hashing/#findComment-320692 Share on other sites More sharing options...
akitchin Posted August 10, 2007 Share Posted August 10, 2007 if you mean a reversible hash, you're wasting your time - anything that you can reverse, someone else is likely to be able to do as well. hashes are often used by comparison, not by actually reversing the algorithm to obtain the input. if you still want to, think of ANYTHING you want to perform to a string. run a length count, do some math to it (that has unambiguous inverse functions), process back out into a random string, and cut it off / lengthen it to reach a set length. just remember the operations and their order, and you should (theoretically - rounding could be a very big source of error in something like this) return to the original parameter. perhaps you could be more specific about what you're trying to do. Quote Link to comment https://forums.phpfreaks.com/topic/64329-solved-crazy-md5-hashing/#findComment-320693 Share on other sites More sharing options...
LiamProductions Posted August 10, 2007 Share Posted August 10, 2007 I don't know if something like this will work but always worth ago: <?php $hashthis = "jghie81fjme019"; echo shuffle('$hashthis'); ?> I don't even know if that even works. but worth a try. shuffle the random letters and numbers up some how i'd say. Quote Link to comment https://forums.phpfreaks.com/topic/64329-solved-crazy-md5-hashing/#findComment-320698 Share on other sites More sharing options...
akitchin Posted August 10, 2007 Share Posted August 10, 2007 it won't work. shuffle() expects an array, and if it DID take strings, it would be shuffling "$hashthis", not the value of $hashthis itself as you're using single quotes. furthermore, this would be useless as a hashing method, as the algorithm is randomized - you could feed it two of the exact same array and get different output. how would one compare the results with any degree of confidence that you're actually evaluating their equality? Quote Link to comment https://forums.phpfreaks.com/topic/64329-solved-crazy-md5-hashing/#findComment-320701 Share on other sites More sharing options...
phpSensei Posted August 10, 2007 Author Share Posted August 10, 2007 What About This ....http://openflv.com/watch?v=NzE3MjQ4OA==&p=0 Quote Link to comment https://forums.phpfreaks.com/topic/64329-solved-crazy-md5-hashing/#findComment-320709 Share on other sites More sharing options...
LiamProductions Posted August 10, 2007 Share Posted August 10, 2007 I don't know if its possible but you could md5 the file name then get a script to take off like the first 10 chars. Then use the rest of the md5 hash to use as the url. Quote Link to comment https://forums.phpfreaks.com/topic/64329-solved-crazy-md5-hashing/#findComment-320713 Share on other sites More sharing options...
phpSensei Posted August 10, 2007 Author Share Posted August 10, 2007 Md5 Is always Somethiing like c868d7wd8248ef78f But He Uses Something like N27aJ4xM, which is So Different... How! Quote Link to comment https://forums.phpfreaks.com/topic/64329-solved-crazy-md5-hashing/#findComment-320714 Share on other sites More sharing options...
akitchin Posted August 10, 2007 Share Posted August 10, 2007 usually it is a hash that they store in the database. generally speaking, i doubt they use a chopped version of an MD5, as this could easily lead to collisions (unless one was to check the database first, to ensure that it's unique). chances are it's just a random string they create for each file, without bothering with a hash. EDIT: it's only different in the number of characters that are rendered in the end. Quote Link to comment https://forums.phpfreaks.com/topic/64329-solved-crazy-md5-hashing/#findComment-320717 Share on other sites More sharing options...
MadTechie Posted August 10, 2007 Share Posted August 10, 2007 Erm.. a 10 char code, simple base 62 calc edit: ie 0000000000 to 9999999999 +1 000000000a you get the idea 62 being a-z + A-Z + 0-9 Quote Link to comment https://forums.phpfreaks.com/topic/64329-solved-crazy-md5-hashing/#findComment-320719 Share on other sites More sharing options...
phpSensei Posted August 10, 2007 Author Share Posted August 10, 2007 OHHHHH, and OHHHHHHH.... Lol, I got It working, Wow I feel like a Genius. Thanks Guys, For all the Hard Effort and Weird Solutions. Quote Link to comment https://forums.phpfreaks.com/topic/64329-solved-crazy-md5-hashing/#findComment-320731 Share on other sites More sharing options...
akitchin Posted August 10, 2007 Share Posted August 10, 2007 would you like to share your genius solution? Quote Link to comment https://forums.phpfreaks.com/topic/64329-solved-crazy-md5-hashing/#findComment-320735 Share on other sites More sharing options...
phpSensei Posted August 10, 2007 Author Share Posted August 10, 2007 KK, I did this... WAIT< Why Should I? Joking Lollerrr... I just took the filename than put it in a variable....then.. . <?php $filename1=$_FILE['name']; $md5= md5($filename1); $arr2 = str_split($md5, 6); $new_file_name= $filename . "_" . $arr2; INSERT INTO CRAP ?> i dONT KNOW IF THAT MADE SENSE Quote Link to comment https://forums.phpfreaks.com/topic/64329-solved-crazy-md5-hashing/#findComment-320746 Share on other sites More sharing options...
MadTechie Posted August 10, 2007 Share Posted August 10, 2007 ECHO akitchin; i doubt they use a chopped version of an MD5, as this could easily lead to collisions Quote Link to comment https://forums.phpfreaks.com/topic/64329-solved-crazy-md5-hashing/#findComment-320749 Share on other sites More sharing options...
phpSensei Posted August 10, 2007 Author Share Posted August 10, 2007 lol... This forum can get so random. Topic Solved. Quote Link to comment https://forums.phpfreaks.com/topic/64329-solved-crazy-md5-hashing/#findComment-320754 Share on other sites More sharing options...
MadTechie Posted August 10, 2007 Share Posted August 10, 2007 if its "solved" then click solved :-\ Quote Link to comment https://forums.phpfreaks.com/topic/64329-solved-crazy-md5-hashing/#findComment-320760 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.