SetRand sets the random number generator to r, which implements io.Reader. If r.Read returns an error when the package requests random data then a panic will be issued. Calling SetRand with nil sets the random number generator to the default generator.
(r io.Reader)
| 317 | // Calling SetRand with nil sets the random number generator to the default |
| 318 | // generator. |
| 319 | func SetRand(r io.Reader) { |
| 320 | if r == nil { |
| 321 | rander = rand.Reader |
| 322 | return |
| 323 | } |
| 324 | rander = r |
| 325 | } |
| 326 | |
| 327 | // EnableRandPool enables internal randomness pool used for Random |
| 328 | // (Version 4) UUID generation. The pool contains random bytes read from |
no outgoing calls