From e0f107f7eef3bca16f8a0445c7dcc244ee0c2a6a Mon Sep 17 00:00:00 2001 From: Nick Moore Date: Thu, 30 Mar 2023 12:39:54 +0100 Subject: [PATCH] Update `RandomHex` code comment to reflect implementation (#63810) --- pkg/util/encoding.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/util/encoding.go b/pkg/util/encoding.go index 1222a468ed6..853ad7a7e34 100644 --- a/pkg/util/encoding.go +++ b/pkg/util/encoding.go @@ -65,7 +65,7 @@ func DecodeBasicAuthHeader(header string) (string, string, error) { return userAndPass[0], userAndPass[1], nil } -// RandomHex returns a random string from a n seed. +// RandomHex returns a hex encoding of n random bytes. func RandomHex(n int) (string, error) { bytes := make([]byte, n) if _, err := rand.Read(bytes); err != nil {