| 396 | } |
| 397 | |
| 398 | std::vector<unsigned char> FastRandomContext::randbytes(size_t len) |
| 399 | { |
| 400 | std::vector<unsigned char> ret(len); |
| 401 | if (len > 0) { |
| 402 | rng.Output(&ret[0], len); |
| 403 | } |
| 404 | return ret; |
| 405 | } |
| 406 | |
| 407 | FastRandomContext::FastRandomContext(const uint256& seed) : requires_seed(false), bytebuf_size(0), bitbuf_size(0) |
| 408 | { |