migrate kubeadm static pod hashing to fnv-1a

128bit fnv-1a should be drop-in for md5 while being fast and non-obsolete
for non-cryptographic purposes.
This commit is contained in:
Benjamin Elder
2025-08-13 16:46:07 -07:00
parent 886fdeefae
commit e0df6b178a

View File

@@ -18,9 +18,9 @@ package staticpod
import (
"bytes"
"crypto/md5"
"fmt"
"hash"
"hash/fnv"
"io"
"math"
"net/url"
@@ -373,7 +373,7 @@ func ManifestFilesAreEqual(path1, path2 string) (bool, string, error) {
return false, "", err
}
hasher := md5.New()
hasher := fnv.New128a()
DeepHashObject(hasher, pod1)
hash1 := hasher.Sum(nil)[0:]
DeepHashObject(hasher, pod2)