24 lines
486 B
C
24 lines
486 B
C
|
//
|
||
|
// Created by xajhuang on 2023/1/30.
|
||
|
//
|
||
|
|
||
|
#ifndef PROJECT_UUID_H
|
||
|
#define PROJECT_UUID_H
|
||
|
#ifdef __cplusplus
|
||
|
extern "C" {
|
||
|
#endif
|
||
|
#define UUID_BYTES (16)
|
||
|
typedef unsigned char uuid_t[UUID_BYTES];
|
||
|
|
||
|
#define uuid_generate(out) uuid_generate_random(out)
|
||
|
|
||
|
void uuid_generate_random(uuid_t out);
|
||
|
void uuid_unparse(const uuid_t uuid, char *out);
|
||
|
void uuid_copy(uuid_t dst, const uuid_t src);
|
||
|
void uuid_parse(const char *in, uuid_t uuid);
|
||
|
|
||
|
#ifdef __cplusplus
|
||
|
}
|
||
|
#endif
|
||
|
#endif //PROJECT_UUID_H
|