| 117 | } |
| 118 | |
| 119 | bool RandomSource::randb() { |
| 120 | uint32_t v = gen32(); |
| 121 | bool parity = false; |
| 122 | while (v) { |
| 123 | parity = !parity; |
| 124 | v = v & (v - 1); |
| 125 | } |
| 126 | return parity; |
| 127 | } |
| 128 | |
| 129 | void RandomSource::randBytes(char* buf, size_t len) { |
| 130 | while (len) { |
no outgoing calls