Skip to content

Commit 5cbbd1a

Browse files
authoredSep 2, 2022
Upgrade hash to sha256. (#126)
1 parent 321cc0e commit 5cbbd1a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed
 

‎pkg/cache/ondisk.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
package cache
22

33
import (
4-
"crypto/md5"
4+
"crypto/sha256"
55
"encoding/hex"
66
"fmt"
77
"io/ioutil"
@@ -23,7 +23,7 @@ func NewOnDiskCache(cache string) Cache {
2323
}
2424

2525
func cachePath(folder, resourceKind, resourceAPIVersion, k8sVersion string) string {
26-
hash := md5.Sum([]byte(fmt.Sprintf("%s-%s-%s", resourceKind, resourceAPIVersion, k8sVersion)))
26+
hash := sha256.Sum256([]byte(fmt.Sprintf("%s-%s-%s", resourceKind, resourceAPIVersion, k8sVersion)))
2727
return path.Join(folder, hex.EncodeToString(hash[:]))
2828
}
2929

0 commit comments

Comments
 (0)
Please sign in to comment.