Update RandomHex code comment to reflect implementation (#63810)

This commit is contained in:
Nick Moore 2023-03-30 12:39:54 +01:00 committed by GitHub
parent ece80e0614
commit e0f107f7ee
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -65,7 +65,7 @@ func DecodeBasicAuthHeader(header string) (string, string, error) {
return userAndPass[0], userAndPass[1], nil 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) { func RandomHex(n int) (string, error) {
bytes := make([]byte, n) bytes := make([]byte, n)
if _, err := rand.Read(bytes); err != nil { if _, err := rand.Read(bytes); err != nil {