From 5cbbd1a898f1fa52752dfab4e754d770c5381aef Mon Sep 17 00:00:00 2001 From: John-Michael Mulesa Date: Fri, 2 Sep 2022 18:28:07 +1000 Subject: [PATCH] Upgrade hash to sha256. (#126) --- pkg/cache/ondisk.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkg/cache/ondisk.go b/pkg/cache/ondisk.go index 123a541..5d7e41b 100644 --- a/pkg/cache/ondisk.go +++ b/pkg/cache/ondisk.go @@ -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[:])) }