| 106 | } |
| 107 | |
| 108 | void random_fixed_byte_array(int n, uint32_t seed, uint8_t* buf, int len, FLBA* out) { |
| 109 | std::default_random_engine gen(seed); |
| 110 | std::uniform_int_distribution<int> d(0, 255); |
| 111 | for (int i = 0; i < n; ++i) { |
| 112 | out[i].ptr = buf; |
| 113 | for (int j = 0; j < len; ++j) { |
| 114 | buf[j] = static_cast<uint8_t>(d(gen)); |
| 115 | } |
| 116 | buf += len; |
| 117 | } |
| 118 | } |
| 119 | |
| 120 | void random_byte_array(int n, uint32_t seed, uint8_t* buf, ByteArray* out, int min_size, |
| 121 | int max_size) { |
no outgoing calls
no test coverage detected