mirror of
https://github.com/k3s-io/kubernetes.git
synced 2026-07-18 13:57:38 +00:00
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:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user