()
| 26 | } |
| 27 | |
| 28 | func (c *cryptoSource) Uint64() uint64 { |
| 29 | var n uint64 |
| 30 | err := binary.Read(rand.Reader, binary.BigEndian, &n) |
| 31 | if err != nil { |
| 32 | c.err = err |
| 33 | } |
| 34 | return n |
| 35 | } |
| 36 | |
| 37 | // secureRand returns a cryptographically secure random number generator. |
| 38 | func secureRand() (*insecurerand.Rand, *cryptoSource) { |