Documentation ¶
Overview ¶
Package rand provides a Randomizer based upon the crypto/rand package.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Randomizer ¶
type Randomizer interface { // Intn returns, as an int, a non-negative random number from 0 to n-1. // If n <= 0, the implementation should return 0. Intn(n int) int }
Randomizer defines a source of random integer values.
func NewCryptoRand ¶
func NewCryptoRand() Randomizer
NewCryptoRand returns a Randomizer based on the crypto/rand package. This method returns a shared singleton instance and does not allocate.
Click to show internal directories.
Click to hide internal directories.