Files
tendermint/crypto/random.go
2022-04-25 12:35:59 -04:00

16 lines
218 B
Go

package crypto
import (
"crypto/rand"
)
// This only uses the OS's randomness
func CRandBytes(numBytes int) []byte {
b := make([]byte, numBytes)
_, err := rand.Read(b)
if err != nil {
panic(err)
}
return b
}