()
| 15 | } |
| 16 | |
| 17 | func (c *cryptoSource) Int63() int64 { |
| 18 | var n int64 |
| 19 | err := binary.Read(rand.Reader, binary.BigEndian, &n) |
| 20 | if err != nil { |
| 21 | c.err = err |
| 22 | } |
| 23 | // The sign bit must be cleared to ensure the final value is non-negative. |
| 24 | n &= 0x7fffffffffffffff |
| 25 | return n |
| 26 | } |
| 27 | |
| 28 | func (c *cryptoSource) Uint64() uint64 { |
| 29 | var n uint64 |
no test coverage detected