diff --git a/lib/util/random.go b/lib/util/random.go index fe77ecf4..8b6c485f 100644 --- a/lib/util/random.go +++ b/lib/util/random.go @@ -17,6 +17,11 @@ import ( // randomCharset contains the characters that can make up a randomString(). const randomCharset = "01234567890abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ-" +func init() { + // The default RNG should be seeded with something good. + mathRand.Seed(RandomInt64()) +} + // RandomString returns a string of random characters (taken from // randomCharset) of the specified length. func RandomString(l int) string {