#include "ext_headers.h"
Go to the source code of this file.
|
| void | lc_uuid_bin2hex (const uint8_t uuid[16], char uuid_str[37]) |
| | Convert a binary buffer into a UUID. More...
|
| |
| int | lc_uuid_hex2bin (const char *uuid_str, size_t uuid_strlen, uint8_t uuid[16]) |
| | Convert a UUID into a binary representation. More...
|
| |
| int | lc_uuid_random (char uuid_str[37]) |
| | Generate random UUID following RFC 4122 section 4.4. More...
|
| |
| int | lc_uuid_time (char uuid_str[37], uint64_t node) |
| | Generate time-based UUID following RFC 4122 section 4.2. More...
|
| |
◆ lc_uuid_bin2hex()
| void lc_uuid_bin2hex |
( |
const uint8_t |
uuid[16], |
|
|
char |
uuid_str[37] |
|
) |
| |
Convert a binary buffer into a UUID.
- Parameters
-
| [in] | uuid | Binary buffer of 16 bytes |
| [out] | uuid_str | NULL-terminated UUID string |
◆ lc_uuid_hex2bin()
| int lc_uuid_hex2bin |
( |
const char * |
uuid_str, |
|
|
size_t |
uuid_strlen, |
|
|
uint8_t |
uuid[16] |
|
) |
| |
Convert a UUID into a binary representation.
- Parameters
-
| [in] | uuid_str | UUID |
| [in] | uuid_strlen | Length of UUID buffer (must be at least 36 bytes) |
| [out] | uuid | Binary buffer with converted UUID |
- Returns
- 0 on success; < 0 on error
◆ lc_uuid_random()
| int lc_uuid_random |
( |
char |
uuid_str[37] | ) |
|
Generate random UUID following RFC 4122 section 4.4.
- Parameters
-
| [out] | uuid_str | NULL-terminated UUID string |
- Returns
- 0 on success; < 0 on error
◆ lc_uuid_time()
| int lc_uuid_time |
( |
char |
uuid_str[37], |
|
|
uint64_t |
node |
|
) |
| |
Generate time-based UUID following RFC 4122 section 4.2.
- Parameters
-
| [out] | uuid_str | NULL-terminated UUID string |
| [in] | node | node identifier the UUID applies to |
- Returns
- 0 on success; < 0 on error