Skip to content

Commit b229436

Browse files
committed
fix: display hash of token for debug purposes
1 parent 5fd0501 commit b229436

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

cmd/generator/main.go

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ import (
55
"bytes"
66
"compress/gzip"
77
"context"
8+
"crypto/sha256"
89
"encoding/json"
910
"fmt"
1011
"io"
@@ -57,6 +58,13 @@ func run(ctx context.Context) (err error) {
5758
log.Fatal("Docker Hub PAT token is empty...")
5859
}
5960

61+
{
62+
h := sha256.New()
63+
_, _ = h.Write([]byte(dhPat))
64+
str := h.Sum(nil)
65+
fmt.Printf("Hash 256 of PAT token: %s\n", str)
66+
}
67+
6068
dhClient, err = Login(ctx, "ctferio", dhPat)
6169
if err != nil {
6270
return err

0 commit comments

Comments
 (0)