Lines Matching refs:uuid
61 std::optional<Uuid> Uuid::FromString(const std::string& uuid) { in FromString() argument
62 if (uuid.empty()) { in FromString()
68 if (uuid.size() == kString128BitLen) { in FromString()
69 if (uuid[8] != '-' || uuid[13] != '-' || uuid[18] != '-' || uuid[23] != '-') { in FromString()
75 uuid.c_str(), in FromString()
102 } else if (uuid.size() == 8) { in FromString()
104 int rc = sscanf(uuid.c_str(), "%02hhx%02hhx%02hhx%02hhx%n", &p[0], &p[1], &p[2], &p[3], &c); in FromString()
112 } else if (uuid.size() == 4) { in FromString()
114 int rc = sscanf(uuid.c_str(), "%02hhx%02hhx%n", &p[2], &p[3], &c); in FromString()
128 std::optional<Uuid> Uuid::FromLegacyConfigString(const std::string& uuid) { in FromLegacyConfigString() argument
129 return FromString(uuid); in FromLegacyConfigString()
150 Uuid Uuid::From128BitBE(const uint8_t* uuid) { in From128BitBE() argument
152 memcpy(tmp.data(), uuid, kNumBytes128); in From128BitBE()
156 Uuid Uuid::From128BitLE(const UUID128Bit& uuid) { in From128BitLE() argument
158 std::reverse_copy(uuid.data(), uuid.data() + kNumBytes128, u.uu.begin()); in From128BitLE()
162 Uuid Uuid::From128BitLE(const uint8_t* uuid) { in From128BitLE() argument
164 memcpy(tmp.data(), uuid, kNumBytes128); in From128BitLE()
179 Uuid uuid; in GetRandom() local
180 RAND_bytes(uuid.uu.data(), uuid.uu.size()); in GetRandom()
181 return uuid; in GetRandom()