From 1c241d28792fad017cbd64bae72ea3f3ee51e4df Mon Sep 17 00:00:00 2001 From: Ian Lance Taylor Date: Thu, 6 Feb 2020 11:18:22 -0800 Subject: [PATCH] hash/maphash: mention that hash values do not persist in package docs Updates #36878 Fixes #37040 Change-Id: Ib0bd21481e5d9c3b3966c116966ecfe071243a24 Reviewed-on: https://go-review.googlesource.com/c/go/+/218297 Reviewed-by: Keith Randall Reviewed-by: Emmanuel Odeke --- doc/go1.14.html | 4 ++++ src/hash/maphash/maphash.go | 3 +++ 2 files changed, 7 insertions(+) diff --git a/doc/go1.14.html b/doc/go1.14.html index 5f7366616160d7..d5ad07754a8309 100644 --- a/doc/go1.14.html +++ b/doc/go1.14.html @@ -616,6 +616,10 @@

Minor changes to the library

The hash functions are collision-resistant but not cryptographically secure.

+

+ The hash value of a given byte sequence is consistent within a + single process, but will be different in different processes. +

diff --git a/src/hash/maphash/maphash.go b/src/hash/maphash/maphash.go index 3f406e9db634e6..3c0fc3628a8dfc 100644 --- a/src/hash/maphash/maphash.go +++ b/src/hash/maphash/maphash.go @@ -9,6 +9,9 @@ // // The hash functions are collision-resistant but not cryptographically secure. // (See crypto/sha256 and crypto/sha512 for cryptographic use.) +// +// The hash value of a given byte sequence is consistent within a +// single process, but will be different in different processes. package maphash import "unsafe"