mirror of
https://github.com/yannh/kubeconform.git
synced 2026-02-11 22:19:25 +00:00
Upgrade hash to sha256. (#126)
This commit is contained in:
parent
321cc0ea1d
commit
5cbbd1a898
1 changed files with 2 additions and 2 deletions
4
pkg/cache/ondisk.go
vendored
4
pkg/cache/ondisk.go
vendored
|
|
@ -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[:]))
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue