Upgrade hash to sha256. (#126)

This commit is contained in:
John-Michael Mulesa 2022-09-02 18:28:07 +10:00 committed by GitHub
parent 321cc0ea1d
commit 5cbbd1a898
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

4
pkg/cache/ondisk.go vendored
View file

@ -1,7 +1,7 @@
package cache
import (
"crypto/md5"
"crypto/sha256"
"encoding/hex"
"fmt"
"io/ioutil"
@ -23,7 +23,7 @@ func NewOnDiskCache(cache string) Cache {
}
func cachePath(folder, resourceKind, resourceAPIVersion, k8sVersion string) string {
hash := md5.Sum([]byte(fmt.Sprintf("%s-%s-%s", resourceKind, resourceAPIVersion, k8sVersion)))
hash := sha256.Sum256([]byte(fmt.Sprintf("%s-%s-%s", resourceKind, resourceAPIVersion, k8sVersion)))
return path.Join(folder, hex.EncodeToString(hash[:]))
}