Skip to content

Commit

Permalink
Updated hash method for creating resource tarball to sha256
Browse files Browse the repository at this point in the history
Signed-off-by: Yinuo Deng <[email protected]>
  • Loading branch information
dynos01 committed Sep 25, 2023
1 parent 1e70345 commit 98e6372
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pkg/imagedistributor/p2p_distributor.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ package imagedistributor

import (
"context"
"crypto/md5"
"crypto/sha256"
"encoding/hex"
"fmt"
"io"
Expand Down Expand Up @@ -406,7 +406,7 @@ func getUnixfsNode(path string) (files.Node, error) {
}

func tarGzDirectory(sourceDir string) (string, error) {
h := md5.New()
h := sha256.New()
h.Write([]byte(sourceDir))
name := hex.EncodeToString(h.Sum(nil))

Expand Down

0 comments on commit 98e6372

Please sign in to comment.