Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
tibbe opened this issue Oct 4, 2012 · 1 comment
Open

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

tibbe opened this issue Oct 4, 2012 · 1 comment

Comments

@tibbe
Copy link
Collaborator

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
Projects
None yet
Development

No branches or pull requests

2 participants