diff options
| author | Max Resnick <max@ofmax.li> | 2024-04-02 21:42:47 -0700 |
|---|---|---|
| committer | Max Resnick <max@ofmax.li> | 2024-04-02 21:42:47 -0700 |
| commit | 36cf7c3c00688f623d62216e71aa2c73f8e8d78a (patch) | |
| tree | 96693c604b81637a598c52f5f1dd320fce18fa40 /internal/authz/model.go | |
| parent | 544fd53047b240170ea51abd418f132b69eadf42 (diff) | |
| download | go-git-server-36cf7c3c00688f623d62216e71aa2c73f8e8d78a.tar.gz | |
feat: switch to hex encoding
Diffstat (limited to '')
| -rw-r--r-- | internal/authz/model.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/internal/authz/model.go b/internal/authz/model.go index efa78f7..1ed61cf 100644 --- a/internal/authz/model.go +++ b/internal/authz/model.go @@ -2,8 +2,8 @@ package authz import ( "crypto/rand" - "encoding/base64" "encoding/csv" + "encoding/hex" "fmt" "math/big" "os" @@ -56,7 +56,7 @@ func GenerateNewToken() (string, string, error) { if err != nil { return "", "", err } - token := base64.URLEncoding.EncodeToString(tokenBytes) + token := hex.EncodeToString(tokenBytes) hash := string(hashBytes) return token, hash, nil } |