Skip to content

Commit d55009c

Browse files
committed
crypto/rand: document additional getrandom/getentropy support in Reader
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>
1 parent 123393a commit d55009c

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/crypto/rand/rand.go

+3-2
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,9 @@ import "io"
1111
// Reader is a global, shared instance of a cryptographically
1212
// secure random number generator.
1313
//
14-
// On Linux and FreeBSD, Reader uses getrandom(2) if available, /dev/urandom otherwise.
15-
// On OpenBSD, Reader uses getentropy(2).
14+
// On Linux, FreeBSD, Dragonfly and Solaris, Reader uses getrandom(2) if
15+
// available, /dev/urandom otherwise.
16+
// On OpenBSD and macOS, Reader uses getentropy(2).
1617
// On other Unix-like systems, Reader reads from /dev/urandom.
1718
// On Windows systems, Reader uses the RtlGenRandom API.
1819
// On Wasm, Reader uses the Web Crypto API.

0 commit comments

Comments
 (0)