Welcome Guest, Not a member yet? Register   Sign In
How to create a short hash
#1

[eluser]dmorin[/eluser]
So here's the deal. I'm creating a site where I send an email and they need to confirm something by clicking a link. But rather then send an MD5 hash as the unique value used to determine that they received the email, I would like to send a shorter random string of maybe 6-8 characters. What's the best way to do this? Should I just calculate an MD5 hash and then grab the first 6 characters and use there, or is there a better way?

I'm aware that by shortening it, my chances for duplicates will be much higher. I'll check the list of existing ones before committing to using one.

If anyone has any ideas of how to better calculate these short hashes/random strings, please let me know. Thanks.


Messages In This Thread
How to create a short hash - by El Forum - 09-18-2007, 07:27 AM
How to create a short hash - by El Forum - 09-18-2007, 07:40 AM
How to create a short hash - by El Forum - 09-18-2007, 07:52 AM
How to create a short hash - by El Forum - 08-28-2008, 03:44 PM
How to create a short hash - by El Forum - 08-28-2008, 10:17 PM
How to create a short hash - by El Forum - 08-29-2008, 09:30 AM



Theme © iAndrew 2016 - Forum software by © MyBB