osurs
0.0.1
|
Generating UUIDs. More...
Go to the source code of this file.
Macros | |
#define | UUID_LEN 36 |
Length of a UUID string, including hyphens. More... | |
Functions | |
void | generate_uuid (char *buffer) |
Generates a unique UUID using a secure random number generator. More... | |
Generating UUIDs.
#define UUID_LEN 36 |
Length of a UUID string, including hyphens.
The length of a UUID string is 36 characters, including the four hyphens that separate the different parts of the UUID.
void generate_uuid | ( | char * | buffer | ) |
Generates a unique UUID using a secure random number generator.
The UUID is generated using a secure random number generator, such as /dev/urandom
on Unix-like systems or the CryptGenRandom
function on Windows. The UUID is stored in the character array pointed to by buffer
. The array must be at least UUID_LEN + 1 bytes long.
buffer | Pointer to a character array where the generated UUID will be stored. |