Update dependencies

This commit is contained in:
bluepython508
2024-11-01 17:33:34 +00:00
parent 033ac0b400
commit 5cdfab398d
3596 changed files with 1033483 additions and 259 deletions

25
vendor/tailscale.com/util/rands/rands.go generated vendored Normal file
View File

@@ -0,0 +1,25 @@
// Copyright (c) Tailscale Inc & AUTHORS
// SPDX-License-Identifier: BSD-3-Clause
// Package rands contains utility functions for randomness.
package rands
import (
crand "crypto/rand"
"encoding/hex"
)
// HexString returns a string of n cryptographically random lowercase
// hex characters.
//
// That is, HexString(3) returns something like "0fc", containing 12
// bits of randomness.
func HexString(n int) string {
nb := n / 2
if n%2 == 1 {
nb++
}
b := make([]byte, nb)
crand.Read(b)
return hex.EncodeToString(b)[:n]
}