mirror of
https://github.com/ipfs/kubo.git
synced 2026-02-22 02:47:48 +08:00
13 lines
177 B
Go
13 lines
177 B
Go
package testutils
|
|
|
|
import "crypto/rand"
|
|
|
|
func RandomBytes(n int) []byte {
|
|
bytes := make([]byte, n)
|
|
_, err := rand.Read(bytes)
|
|
if err != nil {
|
|
panic(err)
|
|
}
|
|
return bytes
|
|
}
|