filebrowser/storage/utils.go
Henrique Dias 18ad9d78b3 ugh
License: MIT
Signed-off-by: Henrique Dias <hacdias@gmail.com>
2019-01-04 12:30:52 +00:00

11 lines
207 B
Go

package storage
import "crypto/rand"
func generateRandomBytes(n int) ([]byte, error) {
b := make([]byte, n)
_, err := rand.Read(b)
// Note that err == nil only if we read len(b) bytes.
return b, err
}