Skip to content

Commit

Permalink
Merge pull request #12133 from simondeziel/randomcryptostring
Browse files Browse the repository at this point in the history
Fix 2 function descriptions in `shared/util`
  • Loading branch information
tomponline authored Aug 10, 2023
2 parents ca6d6f7 + f4041d9 commit 133b35b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions shared/util.go
Original file line number Diff line number Diff line change
Expand Up @@ -329,7 +329,7 @@ func ReaderToChannel(r io.Reader, bufferSize int) <-chan []byte {
return ch
}

// Returns a random base64 encoded string from crypto/rand.
// Returns a random hex encoded string from crypto/rand.
func RandomCryptoString() (string, error) {
buf := make([]byte, 32)
n, err := rand.Read(buf)
Expand Down Expand Up @@ -1340,7 +1340,7 @@ func SplitNTrimSpace(s string, sep string, n int, nilIfEmpty bool) []string {
return parts
}

// JoinTokenDecode decodes a base64 and JSON encode join token.
// JoinTokenDecode decodes a base64 and JSON encoded join token.
func JoinTokenDecode(input string) (*api.ClusterMemberJoinToken, error) {
joinTokenJSON, err := base64.StdEncoding.DecodeString(input)
if err != nil {
Expand Down

0 comments on commit 133b35b

Please sign in to comment.