mirror of
https://github.com/kubernetes-sigs/kustomize.git
synced 2026-06-11 17:12:51 +00:00
Replace deprecated crypto/md5 with crypto/sha256
This commit is contained in:
@@ -18,7 +18,7 @@ limitations under the License.
|
|||||||
package util
|
package util
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"crypto/md5"
|
"crypto/sha256"
|
||||||
"errors"
|
"errors"
|
||||||
"fmt"
|
"fmt"
|
||||||
"path"
|
"path"
|
||||||
@@ -47,7 +47,7 @@ func HashObject(obj runtime.Object, codec runtime.Codec) (string, error) {
|
|||||||
if err != nil {
|
if err != nil {
|
||||||
return "", err
|
return "", err
|
||||||
}
|
}
|
||||||
return fmt.Sprintf("%x", md5.Sum(data)), nil
|
return fmt.Sprintf("%x", sha256.Sum256(data)), nil
|
||||||
}
|
}
|
||||||
|
|
||||||
// ParseFileSource parses the source given.
|
// ParseFileSource parses the source given.
|
||||||
|
|||||||
Reference in New Issue
Block a user