| 15 | namespace kb = koalabox; |
| 16 | |
| 17 | std::string generate_random_string() { |
| 18 | static constexpr char charset[] = "0123456789" |
| 19 | "ABCDEFGHIJKLMNOPQRSTUVWXYZ" |
| 20 | "abcdefghijklmnopqrstuvwxyz"; |
| 21 | |
| 22 | thread_local std::mt19937_64 rng{std::random_device{}()}; |
| 23 | thread_local std::uniform_int_distribution<std::size_t> dist(0, sizeof(charset) - 2); |
| 24 | |
| 25 | constexpr auto length = 16; |
| 26 | std::string result; |
| 27 | result.reserve(length); |
| 28 | for(std::size_t i = 0; i < length; ++i) { |
| 29 | result += charset[dist(rng)]; |
| 30 | } |
| 31 | |
| 32 | return result; |
| 33 | } |
| 34 | |
| 35 | void print_help() { |
| 36 | LOG_INFO( |