Sign in
fuchsia
/
third_party
/
github.com
/
docker
/
docker
/
e6efbd659606386db4d0b83b98f9e189cf42595c
/
.
/
utils
/
random.go
blob: 907f28eec3e18a8f1db828939debbc4a92da7675 [
file
] [
log
] [
blame
]
package utils
import (
"crypto/rand"
"encoding/hex"
"io"
)
func RandomString() string {
id := make([]byte, 32)
if _, err := io.ReadFull(rand.Reader, id); err != nil {
panic(err)
// This shouldn't happen
}
return hex.EncodeToString(id)
}