]> Cypherpunks repositories - gostls13.git/commit
internal/coverage: use 128-bit FNV-1a hash instead of MD5
authorqmuntal <quimmuntal@gmail.com>
Thu, 3 Oct 2024 08:36:36 +0000 (10:36 +0200)
committerQuim Muntal <quimmuntal@gmail.com>
Mon, 7 Oct 2024 15:45:41 +0000 (15:45 +0000)
commit092d18b31824d35a07f796c90380d5e607b61681
treed355140e67228cf6619aecad405d4c423bf54f1b
parent9a44b8e15a0444460358495e5ed2dc78a3470675
internal/coverage: use 128-bit FNV-1a hash instead of MD5

This change replaces the MD5 hash used to identify coverage files with a
128-bit FNV-1a hash. This change is motivated by the fact that MD5
should only be used for legacy cryptographic purposes.

The 128-bit FNV-1a hash is sufficient for the purpose of identifying
coverage files, it having the same theoretical collision resistance as
MD5, but with the added benefit of being faster to compute.

Change-Id: I7b547ce2ea784f8f4071599a10fcb512b87ee469
Reviewed-on: https://go-review.googlesource.com/c/go/+/617360
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Than McIntosh <thanm@golang.org>
Reviewed-by: Ian Lance Taylor <iant@google.com>
Reviewed-by: Cherry Mui <cherryyz@google.com>
src/cmd/covdata/metamerge.go
src/go/build/deps_test.go
src/internal/coverage/cfile/emit.go
src/internal/coverage/decodemeta/decodefile.go
src/internal/coverage/encodemeta/encode.go
src/internal/coverage/encodemeta/encodefile.go
src/internal/coverage/pods/pods_test.go