We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent f531b81 commit 2a5dcd5Copy full SHA for 2a5dcd5
library/core/src/hash/mod.rs
@@ -156,8 +156,10 @@ mod sip;
156
/// ## Prefix collisions
157
///
158
/// Implementations of `hash` should ensure that the data they
159
-/// pass to the `Hasher` are prefix-free. That is, different concatenations
160
-/// of the same data should not produce the same output.
+/// pass to the `Hasher` are prefix-free. That is,
+/// unequal values should cause two different byte sequences to be written,
161
+/// and neither of the two sequences should be a prefix of the other.
162
+///
163
/// For example, the standard implementation of [`Hash` for `&str`][impl] passes an extra
164
/// `0xFF` byte to the `Hasher` so that the values `("ab", "c")` and `("a",
165
/// "bc")` hash differently.
0 commit comments