11 lines
207 B
Go
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
|
|
}
|