[kwlug-disc] Hash functions.

Joe Wennechuk youcanreachmehere at hotmail.com
Sun Jan 2 10:46:04 EST 2011


I want to use a hash type function to generate a unique id for sms messages. I want the smallest possible number of bytes returned as the identifier, I can use all alnum, and even symbols maybe only ASCII up to 127, instead of 256. The input is going to be only 120 chrs+DateTime()+maybe some 10 digit identifier or something, so maybe 200-250 chrs max. for the input, and hopefully like 4-5 chrs for the output with collisions less than 1 in 500,000,000 or so (127^5 is like 33,000,000,000 so that seems ok???).... Is there a function to do this? All the ones I seem to see output in binary or hex only I think I could really reduce the size by using 127 chars instaed of 16, and bites are critical to the app. I suppose I could do some parsing on the binary number and come up with something, but I rater just be done with it. 


Joseph Wennechuk

________________


 		 	   		  
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://kwlug.org/pipermail/kwlug-disc_kwlug.org/attachments/20110102/1195cc06/attachment.htm>


More information about the kwlug-disc mailing list