about summary refs log tree commit diff
path: root/src/libstd/lib.rs
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2016-07-01 15:53:07 -0700
committerGitHub <noreply@github.com>2016-07-01 15:53:07 -0700
commit01411937ff6b2a2dfad03d060d636941b0034591 (patch)
treed2823f782d60f21ba04e03fc7364c73acdb5891b /src/libstd/lib.rs
parent5661be01b61bbd22afbd95fde88591bc50947b42 (diff)
parentdb1b1919baba8be48d997d9f70a6a5df7e31612a (diff)
downloadrust-01411937ff6b2a2dfad03d060d636941b0034591.tar.gz
rust-01411937ff6b2a2dfad03d060d636941b0034591.zip
Auto merge of #33940 - seanmonstar:siphash-1-3, r=alexcrichton
hashmap: use siphash-1-3 as default hasher

Also exposes `SipHash13` and `SipHash24` in `core::hash::sip`, for those that want to differentiate.

For motivation, see this quote from the original issue:

> we proposed SipHash-2-4 as a (strong) PRF/MAC, and so far no attack whatsoever has been found,
although many competent people tried to break it. However, fewer rounds may be sufficient and I would
be very surprised if SipHash-1-3 introduced weaknesses for hash tables.

This keeps a type alias of `SipHasher` to `SipHash24`, and since the internal default hasher of HashMap is specified as "not specified", changing it should not be a breaking change.

Closes #29754
Diffstat (limited to 'src/libstd/lib.rs')
-rw-r--r--src/libstd/lib.rs1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/libstd/lib.rs b/src/libstd/lib.rs
index 135ea8a5e7c..a396c7be09a 100644
--- a/src/libstd/lib.rs
+++ b/src/libstd/lib.rs
@@ -255,6 +255,7 @@
 #![feature(reflect_marker)]
 #![feature(rustc_attrs)]
 #![feature(shared)]
+#![feature(sip_hash_13)]
 #![feature(slice_bytes)]
 #![feature(slice_concat_ext)]
 #![feature(slice_patterns)]