mirror of
https://github.com/golang/go.git
synced 2025-12-08 06:10:04 +00:00
runtime: use urandom instead of random
Random is bad, it can block and prevent binaries from starting. Use urandom instead. We'd rather have bad random bits than no random bits. Change-Id: I360e1cb90ace5518a1b51708822a1dae27071ebd Reviewed-on: https://go-review.googlesource.com/2582 Reviewed-by: Dave Cheney <dave@cheney.net> Reviewed-by: Minux Ma <minux@golang.org>
This commit is contained in:
parent
5664eda733
commit
1de9c4073b
4 changed files with 4 additions and 4 deletions
|
|
@ -45,7 +45,7 @@ func osinit() {
|
|||
}
|
||||
}
|
||||
|
||||
var urandom_dev = []byte("/dev/random\x00")
|
||||
var urandom_dev = []byte("/dev/urandom\x00")
|
||||
|
||||
//go:nosplit
|
||||
func getRandomData(r []byte) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue