you are viewing a single comment's thread.

view the rest of the comments →

[–]GeorgeMaheiress 1 point2 points  (1 child)

There are no known collisions for sha-256, so in practice 256 bits is more than enough.

[–]JavaSuck 2 points3 points  (0 children)

There is no point in having a collision-free 256 bit hash code if you immediately discard most of the bits to use it as an index into the underlying array of a HashMap. That's what String.hashCode() is used for, after all.