]> Cypherpunks repositories - gostls13.git/commitdiff
crypto/rand: document additional getrandom/getentropy support in Reader
authorTobias Klauser <tklauser@distanz.ch>
Mon, 4 Oct 2021 21:55:52 +0000 (23:55 +0200)
committerTobias Klauser <tobias.klauser@gmail.com>
Tue, 5 Oct 2021 07:32:41 +0000 (07:32 +0000)
CL 269999 added support for getrandom on Dragonfly.
CL 299134 added support for getrandom on Solaris.
CL 302489 added support for getentropy on macOS.

Update the godoc for Reader accordingly.

Change-Id: Ice39e5e62f052f21b664db6abbfd97f03944586e
Reviewed-on: https://go-review.googlesource.com/c/go/+/353190
Trust: Tobias Klauser <tobias.klauser@gmail.com>
Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
src/crypto/rand/rand.go

index fddd1147e6e3c692b3f2d4da69f427a10e8eb6fb..b6248a443874df146ac71757fbdeed19660ed66c 100644 (file)
@@ -11,8 +11,9 @@ import "io"
 // Reader is a global, shared instance of a cryptographically
 // secure random number generator.
 //
-// On Linux and FreeBSD, Reader uses getrandom(2) if available, /dev/urandom otherwise.
-// On OpenBSD, Reader uses getentropy(2).
+// On Linux, FreeBSD, Dragonfly and Solaris, Reader uses getrandom(2) if
+// available, /dev/urandom otherwise.
+// On OpenBSD and macOS, Reader uses getentropy(2).
 // On other Unix-like systems, Reader reads from /dev/urandom.
 // On Windows systems, Reader uses the RtlGenRandom API.
 // On Wasm, Reader uses the Web Crypto API.