| 80 | } |
| 81 | |
| 82 | std::string random_string(int64_t n, uint32_t seed) { |
| 83 | std::string s; |
| 84 | s.resize(static_cast<size_t>(n)); |
| 85 | random_bytes(n, seed, reinterpret_cast<uint8_t*>(&s[0])); |
| 86 | return s; |
| 87 | } |
| 88 | |
| 89 | void random_ascii(int64_t n, uint32_t seed, uint8_t* out) { |
| 90 | rand_uniform_int(n, seed, static_cast<int32_t>('A'), static_cast<int32_t>('z'), out); |