Re: hash function to produce 4 byte number out of 16 byte number




toby wrote:
David Spencer wrote:
dmitry.sychov@xxxxxxx writes:

I'am looking for the best hash fn to produce 4 byte number out of 16
byte number

16 byte source number is GUID, ie it has no properties just complete
random number.

If it's truly random, why not just take the low (or high or ...) 4
bytes?

After all, 3 posts can't be wrong!

GUIDs are not random. For some GUIDs, the MAC address is part of it.
http://en.wikipedia.org/wiki/GUID

Anyway, a simple hash will surely be sufficient for the OP's needs.
--
dhs spencer@xxxxxxxxx

.



Relevant Pages