Lines Matching refs:guid
42 // This class is used to generate random GUID.
43 // Currently use random number to generate a GUID since Linux has
44 // no native GUID generator. This should be OK since we don't expect
63 static bool CreateGUID(GUID *guid) {
65 guid->data1 = random();
66 guid->data2 = (uint16_t)(random());
67 guid->data3 = (uint16_t)(random());
68 UInt32ToBytes(&guid->data4[0], random());
69 UInt32ToBytes(&guid->data4[4], random());
87 bool CreateGUID(GUID *guid) {
88 return GUIDGenerator::CreateGUID(guid);
91 // Parse guid to string.
92 bool GUIDToString(const GUID *guid, char *buf, int buf_len) {
93 // Should allow more space the the max length of GUID.
96 guid->data1, guid->data2, guid->data3,
97 GUIDGenerator::BytesToUInt32(&(guid->data4[0])),
98 GUIDGenerator::BytesToUInt32(&(guid->data4[4])));