Skip to content

Commit

Permalink
Upgrade hash to sha256. (#126)
Browse files Browse the repository at this point in the history
  • Loading branch information
jm2 committed Sep 2, 2022
1 parent 321cc0e commit 5cbbd1a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pkg/cache/ondisk.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package cache

import (
"crypto/md5"
"crypto/sha256"
"encoding/hex"
"fmt"
"io/ioutil"
Expand All @@ -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[:]))
}

Expand Down

0 comments on commit 5cbbd1a

Please sign in to comment.