A
Andrea Crotti
In short I need an hash function that gives me a long from an hardware
address.
What could be an easy solution that still gives me a good distribution?
From
"FF2212A.."
I thought I could simply do
(((16 * 16) % LONG_MAX) * 2) % LONG_MAX...
But probably it's a stupid idea.
A mac address is basically 24bytes, and a long is maybe max 8 bytes, so
of course I have to do something to squeeze it...
address.
What could be an easy solution that still gives me a good distribution?
From
"FF2212A.."
I thought I could simply do
(((16 * 16) % LONG_MAX) * 2) % LONG_MAX...
But probably it's a stupid idea.
A mac address is basically 24bytes, and a long is maybe max 8 bytes, so
of course I have to do something to squeeze it...