blog.jj5.net (2003 to 2005)

Cool

Tue Jun 22 19:27:00 UTC+1000 2004

Categories:

I thought this looked cool:

for (Int32 i = 0; i < value.Length; i++) {
  result ^= (((Int32)value[i]) << ((i % 4) * 8));
}

...it's a shame it's a hack.

I just needed to create a hash-code for an arbitrarily long byte array.

Hey, it works. And it looks cool. What more could you possibly want right..? :)

John.


Copyright © 2003-2005 John Elliot