17 lines
271 B
Go
17 lines
271 B
Go
package fstore
|
|
|
|
import (
|
|
crand "crypto/rand"
|
|
"encoding/base32"
|
|
"math/rand"
|
|
)
|
|
|
|
func randString() string {
|
|
size := 8 + rand.Intn(92)
|
|
buf := make([]byte, size)
|
|
if _, err := crand.Read(buf); err != nil {
|
|
panic(err)
|
|
}
|
|
return base32.StdEncoding.EncodeToString(buf)
|
|
}
|