Skip to content

Commit

Permalink
Merge pull request #1469 from oberien/patch-1
Browse files Browse the repository at this point in the history
By default, HashMap does *not* use a cryptographically secure hashing function
  • Loading branch information
steveklabnik authored Sep 17, 2018
2 parents cff0930 + 9d800ad commit 857629a
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion 2018-edition/src/ch08-03-hash-maps.md
Original file line number Diff line number Diff line change
Expand Up @@ -261,7 +261,7 @@ loop, so all of these changes are safe and allowed by the borrowing rules.

### Hashing Functions

By default, `HashMap` uses a cryptographically secure hashing function that can
By default, `HashMap` uses a "cryptographically strong"[^siphash] hashing function that can
provide resistance to Denial of Service (DoS) attacks. This is not the fastest
hashing algorithm available, but the trade-off for better security that comes
with the drop in performance is worth it. If you profile your code and find
Expand All @@ -273,6 +273,8 @@ hasher from scratch; [crates.io](https://crates.io) has libraries shared by
other Rust users that provide hashers implementing many common hashing
algorithms.

[^siphash]: [https://www.131002.net/siphash/siphash.pdf](https://www.131002.net/siphash/siphash.pdf)

## Summary

Vectors, strings, and hash maps will provide a large amount of functionality
Expand Down

0 comments on commit 857629a

Please sign in to comment.