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)
| 345 | // Calling SetRand with nil sets the random number generator to the default |
| 346 | // generator. |
| 347 | func SetRand(r io.Reader) { |
| 348 | if r == nil { |
| 349 | rander = rand.Reader |
| 350 | return |
| 351 | } |
| 352 | rander = r |
| 353 | } |
| 354 | |
| 355 | // EnableRandPool enables internal randomness pool used for Random |
| 356 | // (Version 4) UUID generation. The pool contains random bytes read from |
no outgoing calls