osurs  0.0.1
Macros | Functions
uuid.h File Reference

Generating UUIDs. More...

This graph shows which files directly or indirectly include this file:

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...
 

Detailed Description

Generating UUIDs.

Date
: 2022-12-29
Author
: Merlin Unterfinger

Macro Definition Documentation

◆ UUID_LEN

#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.

Function Documentation

◆ generate_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.

Parameters
bufferPointer to a character array where the generated UUID will be stored.