Documentation
¶
Overview ¶
Package rand implements a cryptographically secure pseudorandom number generator.
Index ¶
Examples ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var Reader io.Reader
Reader is a global, shared instance of a cryptographically strong pseudo-random generator.
On Unix-like systems, Reader reads from /dev/urandom. On Linux, Reader uses getrandom(2) if available, /dev/urandom otherwise. On Windows systems, Reader uses the CryptGenRandom API.
Functions ¶
func Prime ¶
Prime returns a number, p, of the given size, such that p is prime with high probability. Prime will return error for any error returned by rand.Read or if bits < 2.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.