| 74 | } |
| 75 | |
| 76 | void random_bytes(int64_t n, uint32_t seed, uint8_t* out) { |
| 77 | pcg32_fast gen(seed); |
| 78 | std::uniform_int_distribution<uint32_t> d(0, std::numeric_limits<uint8_t>::max()); |
| 79 | std::generate(out, out + n, [&d, &gen] { return static_cast<uint8_t>(d(gen)); }); |
| 80 | } |
| 81 | |
| 82 | std::string random_string(int64_t n, uint32_t seed) { |
| 83 | std::string s; |
no outgoing calls