Combine hash values in C#
Posted
by Chris
on Stack Overflow
See other posts from Stack Overflow
or by Chris
Published on 2010-03-17T10:43:52Z
Indexed on
2010/03/17
10:51 UTC
Read the original article
Hit count: 286
c#
|best-practices
I'm creating a generic object collection class and need to implement a Hash function. I can obviously (and easily!) get the hash values for each object but was looking for the 'correct' way to combine them to avoid any issues. Does just adding, xoring or any basic operation harm the quality of the hash or am I going to have to do something like getting the objects as bytes, combining them and then hashing that?
Cheers in advance
© Stack Overflow or respective owner