4 * Utility functions for handling 16-byte globally unique identifiers (GUIDs).
12 #include "wimlib/util.h"
17 copy_guid(u8 dest[GUID_SIZE], const u8 src[GUID_SIZE])
19 memcpy(dest, src, GUID_SIZE);
23 cmp_guids(const u8 guid1[GUID_SIZE], const u8 guid2[GUID_SIZE])
25 return memcmp(guid1, guid2, GUID_SIZE);
29 guids_equal(const u8 guid1[GUID_SIZE], const u8 guid2[GUID_SIZE])
31 return !cmp_guids(guid1, guid2);
35 generate_guid(u8 guid[GUID_SIZE])
37 return get_random_bytes(guid, GUID_SIZE);
40 #endif /* _WIMLIB_GUID_H */