Allow the hash salt to be set when constructing a map/set #45

Open
tibbe opened this Issue Oct 4, 2012 · 0 comments

Comments

Projects
None yet
1 participant
Owner

tibbe commented Oct 4, 2012

Hashable allows for passing a salt to use when hashing using the hashWithSalt method. Not using a default salt (which we do now) is good as it makes it harder for attackers of e.g. web servers that use HashMaps to store user supplied data to guess the hashes and create collisions. By allowing clients to provide this salt when creating the map such attacks could be avoided.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment