| 47 | } |
| 48 | |
| 49 | std::string generate_hex(const unsigned int len) |
| 50 | { |
| 51 | std::stringstream ss; |
| 52 | for (unsigned int i = 0; i < len; i++) |
| 53 | { |
| 54 | auto rc = random_char(); |
| 55 | std::stringstream hexstream; |
| 56 | hexstream << std::hex << int(rc); |
| 57 | auto hex = hexstream.str(); |
| 58 | ss << (hex.length() < 2 ? '0' + hex : hex); |
| 59 | } |
| 60 | return ss.str(); |
| 61 | } |
| 62 | |
| 63 | std::string generate_uuid() |
| 64 | { |
no test coverage detected