Skip to content

Commit 909ece4

Browse files
committed
helm: use digest lib for checksum calculation
Signed-off-by: Hidde Beydals <[email protected]>
1 parent b89b049 commit 909ece4

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

internal/helm/repository/chart_repository.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ import (
2424
"encoding/hex"
2525
"errors"
2626
"fmt"
27+
"github.com/opencontainers/go-digest"
2728
"io"
2829
"net/url"
2930
"os"
@@ -302,7 +303,7 @@ func (r *ChartRepository) LoadIndexFromBytes(b []byte) error {
302303

303304
r.Lock()
304305
r.Index = i
305-
r.Checksum = fmt.Sprintf("%x", sha256.Sum256(b))
306+
r.Checksum = digest.SHA256.FromBytes(b).Hex()
306307
r.Unlock()
307308
return nil
308309
}

0 commit comments

Comments
 (0)