MCPcopy Create free account
hub / github.com/PDAL/PDAL / generate_hex

Function generate_hex

plugins/e57/io/Uuid.cpp:49–61  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

47}
48
49std::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
63std::string generate_uuid()
64{

Callers 1

generate_uuidFunction · 0.85

Calls 3

random_charFunction · 0.85
strMethod · 0.80
lengthMethod · 0.45

Tested by

no test coverage detected